OPC-UA client: "static" class was forgotten for open62541 client structure preventing multiple client.
authorEdouard Tisserant <edouard.tisserant@gmail.com>
Mon, 17 Jan 2022 15:17:47 +0100
changeset 3407 2f5c30054d50
parent 3406 3aac4241dafa
child 3411 3e162ea3c726
OPC-UA client: "static" class was forgotten for open62541 client structure preventing multiple client.
opc_ua/opcua_client_maker.py
--- a/opc_ua/opcua_client_maker.py	Mon Jan 17 15:15:00 2022 +0100
+++ b/opc_ua/opcua_client_maker.py	Mon Jan 17 15:17:47 2022 +0100
@@ -485,11 +485,11 @@
 #include <open62541/client_highlevel.h>
 #include <open62541/plugin/log_stdout.h>
 
-UA_Client *client;
+static UA_Client *client;
 
 #define DECL_VAR(ua_type, C_type, c_loc_name)                                                       \\
-UA_Variant c_loc_name##_variant;                                                                    \\
-C_type c_loc_name##_buf = 0;                                                                        \\
+static UA_Variant c_loc_name##_variant;                                                             \\
+static C_type c_loc_name##_buf = 0;                                                                 \\
 C_type *c_loc_name = &c_loc_name##_buf;
 
 %(decl)s