From patchwork Mon Jun 17 07:12:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Storm, Christian" X-Patchwork-Id: 1948486 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20230601 header.b=uYHCfXQd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2607:f8b0:4864:20::b39; helo=mail-yb1-xb39.google.com; envelope-from=swupdate+bncbdd6bwv65qpbbuodx6zqmgqeexocvhq@googlegroups.com; receiver=patchwork.ozlabs.org) Received: from mail-yb1-xb39.google.com (mail-yb1-xb39.google.com [IPv6:2607:f8b0:4864:20::b39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4W2h0R5JPZz20Wg for ; Mon, 17 Jun 2024 17:12:22 +1000 (AEST) Received: by mail-yb1-xb39.google.com with SMTP id 3f1490d57ef6-dfeff1ae480sf7711740276.2 for ; Mon, 17 Jun 2024 00:12:22 -0700 (PDT) ARC-Seal: i=3; a=rsa-sha256; t=1718608339; cv=pass; d=google.com; s=arc-20160816; b=jIwSdiLUFlp6GkO5PiQ387eRzhh1vc1UMBOp06p8Wk1Ur1UoJH20qiN3JRQ+3RtTCe jurKf4TrJ81ReQtoos4+Pyh84aVCz3tfhodhaiQzfNVrQWS3zFlbKfefoaf42Wo1ULGs 1TzahcITPeo5xR/5e3aW4CfLoPEbtcC2KpqKSA+NfCMFEFa+VHDyQ8XRcJHQTScRJVhU GAAVEgXwCYP8UJDf6CFUy3wjOsmDKyH8dxwnVYeIA4+7Hr2UVnRJ3Gs5GOjM+GdWAFJr p09XP3Ch3Y3phIjMD0g9vvRVAHhYuja/VVBYSU6j73PEq9edNZrBbMyyJD2vpGUiRIun uqzg== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:mime-version:content-id :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:to:from:dkim-signature; bh=3rqUqeCIhZM9ie3AnU33VWtN6VD7DH23680tLKzhuTc=; fh=/CkLKmyO2nw3f0Cq1rdX3hJRfnaUQYlwXk9PeBWua7Y=; b=Mlu1d3of8eU/pdSwV5AaS+3t49rO7oplT7AHdSQ7JOXzUL+bUEyKD80FqCqFlhKqN1 ZJrYE9i9EqaHXfRMpJh8DhwhPAao/1oU02D4AXEYd79F/jzl1Mx9iuHxzh0Bk40tMJOi FQCyI6vNYOKr/9PF3NZuvJkopEYkcZGUWIeuwfDkCnU2vcchv009J26vpfQMeaa/eUWh 6I0syJDcXrV/8yEt+xbm2o1lXWcs7ExoNDHeifru0PhD3ev6HOEVLcwfQXL585LKzDCo 9u5hnU2EPiLVCA086s6nbEWsBpzQbYVVvB09F+rMyYcllrgR15uPZ4+zameB7mCmRkKZ RCQg==; darn=patchwork.ozlabs.org ARC-Authentication-Results: i=3; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=PeYE0IQa; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f403:260f::61c as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1718608339; x=1719213139; darn=patchwork.ozlabs.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :content-id:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3rqUqeCIhZM9ie3AnU33VWtN6VD7DH23680tLKzhuTc=; b=uYHCfXQd8IujG3Ox4I+RvvLfS0VD7q3vfXBpePo1oPOFJGqBNEukxV3VOIHyjSOBqZ DVg8WxHa4ryP7gyW+k3Bjn7OOgBxCTJW33EXd84vLSDW6QG8i1/Vppqu3rds+RpBk98l pM0B+85tTYOo0agAV7RcvVv6w7dYxQoEiMsrC1cGceG2trVksQajVOwUUsb7769zt5gM EnKxvpOQ8np/qq1tAWGLTS+bPZgFeTBnvys6YS7teFGY14qVtvek27hvheNyO51/e16E ViuWdbjPeXBk5EWVB53HRmcY7rRxi9wuFexvdki5Hv804yDWv1SjzM0JbDGlPzb7DdXa p0DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718608339; x=1719213139; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:mime-version :content-id:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=3rqUqeCIhZM9ie3AnU33VWtN6VD7DH23680tLKzhuTc=; b=Qg6F8sUPE0kmVJDjji5KmbWP+dAHspwR/ZXDnn3pj462YkThYxtu9PMTW8lK6BN35g vBzHbHvG0Ag9IWeIutA7kQnHnjYr+KXMhcl+NizZIUjmivGvMeZMxlIMNAmUU166zPSP uTShpK42I/aceOmdXv+5d+8gUok7beVRrB+yjeeuaEczjUz0Sl6zmJsHwmV5UQB411d3 0om7Kp5UQ+8DIcd/s1OPlT2psl1fDdUbujzm8/pXYDiqmk4a2qdVA5MyDJDj+SxijN3S d4SQwe6iXvL9shUnnbAJbi+Z03C0bbc5ycBDFtprl5fej3C+S+eD9g5LpCUfQYZKvSSK uH/w== X-Forwarded-Encrypted: i=3; AJvYcCXwsQMeqF1wQQtiZD2dh5vlLJ1Rts6uS9cT1dYimHBW23wV9Vi6dH6qUkmgF5TYt8CgWqqkoOS5TpH/1p3AtKTInby3THgf+EtKorXBeQ== X-Gm-Message-State: AOJu0Yxei2nX5G8XgHj7fRm8HhgBGoPDQffC8FdK+MxL9cIz1EEZCWto ck8xB3kvn1SlF96YTnLpC5bc8O3bJLoF+ZIBdquwj1yj9JJElsvP X-Google-Smtp-Source: AGHT+IHKyD30UpqlfahnLeVfgpGldLkuQFQzJtq1hDsjURqKdYDgHJeYp5KJ97vqIdmB+6ORoop8bg== X-Received: by 2002:a25:c754:0:b0:dfa:fed0:caee with SMTP id 3f1490d57ef6-dff153feaabmr9499533276.39.1718608338628; Mon, 17 Jun 2024 00:12:18 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a05:6902:1009:b0:dfe:54e6:8233 with SMTP id 3f1490d57ef6-dff34cda093ls1761495276.0.-pod-prod-08-us; Mon, 17 Jun 2024 00:12:17 -0700 (PDT) X-Received: by 2002:a25:ce48:0:b0:dfb:8c6:1e99 with SMTP id 3f1490d57ef6-dff153583eemr9153149276.8.1718608337054; Mon, 17 Jun 2024 00:12:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718608337; cv=pass; d=google.com; s=arc-20160816; b=JDO+vJCY6g0xSJHz7Rcw+B7O7EE/bdwWtsTviu3Sdg/b/WnhONfYZM9LjMNbIN/VdM 1B45F/cSK1gqH1/pUQopFCK2oLloMC8uOnByie1nEOIVJ6vwJaLITV4dNXdf9/qYLou3 rHd/XnOtHDu65DVa9R47eB7ZyezOzTYjUaO4iVECYNS59cFX6LA5oeyaNeJwyzjD97nZ rXTrrBW6jrr6CROmjot29Jeh2BTM669Y+S8nQOZyEhbRkaft/BG9S7cEqFzLIemJraQF QDehZdaMwkqWJ+7kUFbDvz6bqKUyvfiIdLE2/EHZvdIeQOpj5K2lE1tBIkUjfg/yUwSN 4XsQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:content-id:content-language :accept-language:message-id:date:thread-index:thread-topic:subject :to:from:dkim-signature; bh=xcTqai47ps0D0FZjcC3rJgI15nVVKIoMWc4yfvRxQ2M=; fh=ZnR/GV7fAozRX3tpIO3vp/Jbul8ISZhdVjghlw9eWq0=; b=fVSlxbq5qcbKJFt0ylICdmWbOOzK6ayC8l7CLtHO+906K5D4Kd2sQRgQ2BuoVSFXFx Ebh1Wp/xRtuNkydkwj3pDWBBLVrpxfnplHuPhlob9EZeQMkX9RtoEaSeCfqIFLqXwBzy +GmxlrppYZHvyeEtgBSsOSBPCIeJubCwthPkWjzqh1kfCrOhk3D5rmU3zABxX7C1WPcT Kotrz4s4LZ7JZlu7kj0JbXcKS47UPZDnqrZR+h4PwRAAUjJwLdt+8jjE2k9hJt1q5fc9 BHWd4a0iEeMQ5kN3BLz/ruQDA0bENiIAZYb5wngFwat07t4QoFPKPDjdV1k1AKOINTKe pXew==; dara=google.com ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=PeYE0IQa; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f403:260f::61c as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2061c.outbound.protection.outlook.com. [2a01:111:f403:260f::61c]) by gmr-mx.google.com with ESMTPS id 3f1490d57ef6-dff0460bb4dsi431589276.1.2024.06.17.00.12.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Jun 2024 00:12:16 -0700 (PDT) Received-SPF: pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f403:260f::61c as permitted sender) client-ip=2a01:111:f403:260f::61c; ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=guM7te4spqvTbocwdqGiXEjN/BG+bV4yJWJ4nC7/AtS/h0mCprpHeNhEx/4jxaLoyboe88NOc9fF/Z0atYYwNujE4dsezfKL7T9ODzONBuo8J/cVXQSLpJO7orTe0JIqrmfvyC2IvJGq2Y7emf1NMH7vUI9ZzA0ydmtFVmgmnb5Jc6TsR2MYHjAdjIgbqElt1Sl6XUuPHArh5e0IZCGNxXUkPTRuMh9iJpPoaWpI+dP77Lg2EusaZxGAoJm4sM+M4NHM1LePKz1vUxfrNQ33uaRzu4Uo6rQybtcUH3Ot6Zueszl8JJLT95QhHDBlvROwkXOfJTFVx8K35Yt2OjtElg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=xcTqai47ps0D0FZjcC3rJgI15nVVKIoMWc4yfvRxQ2M=; b=AhgyyhNCeB+TRqxj91XnLk+V1T9AuwmCsBX23s2hxID2fqv40DZfuof9o9l4+z1/j8cDWg1z1s9tkY6HUP8y8Lqo4cuxd9wi/MmvTa4zWv3wa9xASyHd3ZpHnkDwahtUXuQGEuEb5bIBPCCGOoUuNV8bTMsIt6dZNcqJHofIe/Xaf/Wk8ygi+lBf5nUbeyGqxD0Tb577GiLhV3GyGDLOqcxkpA3qGg/nIMaFCZCWcj5v+zCfC2yfzjhlsk2/XzGAgoV7S4pUQfOQqSCYbxY7o8ptBqgxn7fbKYpkmU3fh4sgFg+5lCXfo1oNsK1SVskMAPEnOpEReHxMkArCCwxLuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=siemens.com; dmarc=pass action=none header.from=siemens.com; dkim=pass header.d=siemens.com; arc=none Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:333::17) by PA2PR10MB8552.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:102:422::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:12:14 +0000 Received: from DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::e659:e46:3b99:a440]) by DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM ([fe80::e659:e46:3b99:a440%4]) with mapi id 15.20.7677.030; Mon, 17 Jun 2024 07:12:14 +0000 X-Patchwork-Original-From: "'Storm, Christian' via swupdate" From: "Storm, Christian" To: swupdate Subject: [swupdate] [PATCH] Lua: Remove global Lua state Thread-Topic: [PATCH] Lua: Remove global Lua state Thread-Index: AQHawIWt23C/Pimu0EO9M6Gkwh6YCw== Date: Mon, 17 Jun 2024 07:12:14 +0000 Message-ID: <7E92DEDC-48CD-4D3D-9A01-FEF7A98202F6@siemens.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DB9PR10MB5404:EE_|PA2PR10MB8552:EE_ x-ms-office365-filtering-correlation-id: 5c98a0a5-007b-4277-2cd4-08dc8e9cd078 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230037|376011|1800799021|366013|38070700015; x-microsoft-antispam-message-info: 5MipswTQz1ZT71dPZ1f9u7XQRooEnn5ja0wuHHiqlq6hgtCScD3g/1L4NPt45dTuBNKI8scLIQoNrYMo5NiO85fJPTiY6YZ9FycUSu6jPuaJ0S9ZYz2+eF6pVMQxQV4XGArIt9y+gvPOAGHH2dVTlIa6llAkGoVlnUYdMUtivq4r1KabTtg4jvwCuOAt9TGF+K/eJz6WcVjNtbGfrhvPfiXKlO44j+j2KIc/EaqAw5CdFPBA878+V743rLuvbsvAmjyP/PIWeQZxlp6/sH0xsbcxeGRoL6Sgh6dkR8USbaCBIuFLDHec8OQyde3J8Zk8orHSPkMnY/hGNL8Dk5eaJOTAmmz4fgw6uWqEH7DDBHNpHQq3dtWyv7Vk0zw+6tg/O9/cmXOxaJ1bjdtxrlMlb0vvdDdX4tLR9MPwRavT+8WqvlvXWzXdeg4Lr3ytoSwIrll5WPa0dZ28weQijmo60NVr3kuPW2vGvo0L49GpevPCZx+28rkFKRxYgWWmqsMFWYkofNNVTlVQSAAmbFOKNqzQMbUd4fpth/iH2HDM8IeO5xhHQkU3GR8tydlr3GJ4ZAaEgpQ4mhM5Y6uG3TUU5q7ZLk+Dltn4jayoVxUdr+Mc311RqFOtfxvOShUOlY3R7IqclNpbCRElNybzhyn4SNq1clgXykUwax2UU8dWQrPC96RRxci5svFKr1foqEh0ueKnQQH1r+jYto1zcQN1JwphNaEmOA5yDVlhMpKHCueHh9mbxYQvEnUc4e6iqDEPWaSLmeDnlSn5YB+H7lT1wlhZK28cwP5kwd/4PHMDJfuUgn+ZH3uqawN8Pt+RNE+vg8aetGADBgExfBDx3nNqeggr/RMY2fpavsLigijYWy4XykydSB61O6kNzJkncfVRPj+4O07xPdMJ58NJPhit12ymgjdl2b0CWEBhKjKK/3o61yOVdgvx+fmIHcnkbhnr03F04CI5C+UiZHqnKjcI/7RB8ttgpNz8pMrhguaTM1Q5lwqBo+5MzWb0+c4/wvMtZTU6xl4owwnB7m6MSFERNpkNoBR/QKW43bjDpMYckGIdyH0ADuQOejDP6gxPKLI3nli38G84yRu0sy9y9zUvmuHxNlk6Y0M0UWB7fOmpCEG5d6FkiMl0raBAD85GjMhUJv9TMb2i2pYOt0d3PzE+fwbpfEmkifyaagEstmCJ7Yv1iStl55YUbJJk5zUYD+Q6dP//Lex3J02iN/vElUFbwt2jBpHA1cuc+JzVnQyKTwOG8S0P80MACEG6X0gOnNIt8x6E7Rm7bPp8qdtlkWrK4qnSRaIAhglDTVR47LhZBpMMvrQruBfm486TpOUYOluSgiZA9qgIZCepsgeHmDrIxK3ZwFAbrWMObvyWIXhwcEE= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM;PTR:;CAT:NONE;SFS:(13230037)(376011)(1800799021)(366013)(38070700015);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: pIB3rPxYBYY5FU3Uw9rZRcSaFW7A3qB7zRybJt9f9YnLzX3lrPQyyG5R4nz+fUb4++UDAznAnVmLixrOGJsj7CyhBtRNUbdN3UJsUP/F2yvP9y9cOrSclCX8SEYiSf8MjFxb2mRola4iTtq6+VP7RvuhWLqOblhK6CgDoNd+Zt201rfCzVTuD/3a0CgZu8JDTlDQDPYBCkxCRnnEYX/I5mvwjFdKxaxyt/ajfYLY4akzwmY/G605ykMThOXgp74CLdqEzY9YHMikhbkvdNYPyPeIkS9WmfRzMqPGxLjrvHTkzKMU894v5k8yIjZ9iZr5YLYZ6tB2HoAGmIFPYF11YwQJ8DlZMdFUf2ai769qIoF9mRo5K0AbbngOiYRvM+m+bCyaYEQuR7NISDmq5cC7RO2WczNDFOaMfaTHi2CadirOHoMfjY9XIF/cpufekYvvXvT4zOiVBLWmFfNUSlQoOXpMzDQy8huZN4x8enDQLVWhmd1cpi53vOPatW0crj1bwor0WSkeIJ0zJD6ocKo/PaYGhq+z0/rrogWa+TQyVyV32QyRoTVp9VWFDnkvb80b+sAqgozuHGY+HPmwNAL3mcrcDe3j0NL0t99keA3bKABaBRiee6JwgOYFobfixef8MegIycdQtCSbyDa+9SM15xNTYqHH7Zap7VEEnGQLUgE3g6DCeTyeSQDt75uEJksjZ1xYcz/MwoDWrU17Z8cqCyEd1SjR0JdlilfFUzyMj9Kv612d9dJCEp/0n0vid3JdMgKIQ3rXIv26aF0q4kloDYgjS0LdV1wF+MouHclPY/Z0lE0ofOoj8pDIPyXlk9Vt79dQsRfCl5XJ6kR/oMlgwAu63+XGidyDHgqEpHj2xflTjqVmXT8qsM0gh+n4dimdary8NmZrdJctQ+S2AI8Qqa7mqlloyi6y7HeEX17qoN77unCPWUJBqhiv/nLF8gNOIQRbM8DlawNovkwa9YVkklwKHsSZpfxbMGUhovA/nnaaMabu0hpT0rsEyCC+06D6pj8SuKNgc/nu5if+Sd4rP6uKxs5np9AsxhpcF+hkGi2CHe83M+hxqZ0XK3UT6PAbJZ5dSe4uy1zAoEWNhMY5sI6gn4lKUsmpFDjoWYBHfOehtJYYsBz2Nz7dR/JL7h8ozM8gZ66u/L8lWpsZymlCAVkAdLZQNZv6Rw6KKoU9G36J/oqbTmwBQdUqqc3FDY+bDZbrHbbOz8sgDkRkJYyT0whD7Lpg4eFdJDWL8hfN2IKyC4HKsyedIsVoEIMlVslvzIsRatb/enkEz7SYJI1xywibxYgKSr/vM9sfIaDL/gaCOsCpIWD/1mvXOuJBqKD1z9zaWVuvDe7s9fxZDhZ0r3L+JCHWYteBKkBaS9eOQ+y5BGdW6wRdGHIziXlzEwvZNIvSh935ST7iLMWHenjUM9yUukKuLrgvsvSctq8WyXyYGh4SjAMqI2HDQMFg47oB3CMHbbrAUlUl6rhSuoerYbLVcJuPqXJBEkfBmHj5fHJU7WnTZVa8k9JBfHDcJOvuL1dnyBPpimmoLx0lGZ/TVSNkASIsM+hjthYo+wYxhr9Qbo0l112xpVKGbDizyu7CyQK/lWURVQlt4z1Rc7oeFQ== Content-ID: <57FF7167E8E2874D8C51541AEC5D028F@EURPRD10.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DB9PR10MB5404.EURPRD10.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 5c98a0a5-007b-4277-2cd4-08dc8e9cd078 X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jun 2024 07:12:14.2958 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8cVynRnx8h7dHmpLsAHtOEyO1bXVhkBtZJ3h0sSp0gr3N8fJnF71XA3f2V0UcB9MEu9BrBz9TPvPBWvYanPmEzbVlDE61ocS+NxEV2kXfWU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA2PR10MB8552 X-Original-Sender: christian.storm@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=PeYE0IQa; arc=pass (i=1 spf=pass spfdomain=siemens.com dkim=pass dkdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of christian.storm@siemens.com designates 2a01:111:f403:260f::61c as permitted sender) smtp.mailfrom=christian.storm@siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: "Storm, Christian" Reply-To: "Storm, Christian" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , With sessionized Lua handlers, there's no need for a global Lua state any longer. Signed-off-by: Christian Storm --- corelib/lua_interface.c | 39 ++++++++------------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/corelib/lua_interface.c b/corelib/lua_interface.c index 6b425dd0..1006306c 100644 --- a/corelib/lua_interface.c +++ b/corelib/lua_interface.c @@ -1298,8 +1298,6 @@ static int luaopen_swupdate(lua_State *L) return 1; } -static lua_State *gL = NULL; - /** * @brief wrapper to call the Lua function * @@ -1324,14 +1322,15 @@ static int l_handler_wrapper(struct img_type *img, void *data, struct installer_handler *hnd; hnd = find_handler(img); - if (!gL || !img || !data || !hnd) { + if (!img || !data || !hnd) { return -1; } if (hnd->noglobal) { L = img->L; } else { - L = gL; + ERROR("Calling session Lua handler in non-session context."); + return -1; } if (img->bootloader) { @@ -1407,7 +1406,6 @@ static int l_other_handler_wrapper(struct img_type *img, void *data) */ static int l_register_handler( lua_State *L ) { int *l_func_ref = malloc(sizeof(int)); - handler_type_t lifetime = GLOBAL_HANDLER; if(!l_func_ref) { ERROR("Lua handler: unable to allocate memory"); @@ -1435,34 +1433,16 @@ static int l_register_handler( lua_State *L ) { const char *handler_desc = luaL_checkstring(L, 1); - /* - * Check if the handler must be registered globally - * or just during the update - */ - if (L != gL) { - lifetime = SESSION_HANDLER; - } /* store the callback function in registry */ *l_func_ref = luaL_ref (L, LUA_REGISTRYINDEX); /* cleanup stack */ lua_pop (L, 1); - switch (lifetime) { - case GLOBAL_HANDLER: - register_handler(handler_desc, - (mask & SCRIPT_HANDLER) ? - l_script_handler_wrapper : - l_other_handler_wrapper, - mask, l_func_ref); - break; - case SESSION_HANDLER: - register_session_handler(handler_desc, - (mask & SCRIPT_HANDLER) ? - l_script_handler_wrapper : - l_other_handler_wrapper, - mask, l_func_ref); - break; - } + register_session_handler(handler_desc, + (mask & SCRIPT_HANDLER) ? + l_script_handler_wrapper : + l_other_handler_wrapper, + mask, l_func_ref); /* add newly registered handler to current Lua stack */ lua_getglobal(L, "swupdate"); @@ -1606,9 +1586,6 @@ int lua_init(void) print_registered_handlers(false); unregister_session_handlers(); lua_close(L); - if (!gL) { - gL = luaL_newstate(); - } return res; }