|
@@ -23,10 +23,7 @@ int main(int argc, char** argv) {
|
|
signal(SIGINT, stopHandler); /* catches ctrl-c */
|
|
signal(SIGINT, stopHandler); /* catches ctrl-c */
|
|
|
|
|
|
/* initialize the server */
|
|
/* initialize the server */
|
|
- UA_ServerConfig config = UA_ServerConfig_standard;
|
|
|
|
- UA_ServerNetworkLayer nl = UA_ServerNetworkLayerTCP(UA_ConnectionConfig_standard, 16664);
|
|
|
|
- config.networkLayers = &nl;
|
|
|
|
- config.networkLayersSize = 1;
|
|
|
|
|
|
+ UA_ServerConfig *config = UA_ServerConfig_new_default();
|
|
UA_Server *server = UA_Server_new(config);
|
|
UA_Server *server = UA_Server_new(config);
|
|
|
|
|
|
/* create nodes from nodeset */
|
|
/* create nodes from nodeset */
|
|
@@ -35,7 +32,6 @@ int main(int argc, char** argv) {
|
|
"nodeset does not match. The call to the generated method has to be "
|
|
"nodeset does not match. The call to the generated method has to be "
|
|
"before any other namespace add calls.");
|
|
"before any other namespace add calls.");
|
|
UA_Server_delete(server);
|
|
UA_Server_delete(server);
|
|
- nl.deleteMembers(&nl);
|
|
|
|
return (int)UA_STATUSCODE_BADUNEXPECTEDERROR;
|
|
return (int)UA_STATUSCODE_BADUNEXPECTEDERROR;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -44,6 +40,6 @@ int main(int argc, char** argv) {
|
|
|
|
|
|
/* ctrl-c received -> clean up */
|
|
/* ctrl-c received -> clean up */
|
|
UA_Server_delete(server);
|
|
UA_Server_delete(server);
|
|
- nl.deleteMembers(&nl);
|
|
|
|
|
|
+ UA_ServerConfig_delete(config);
|
|
return (int)retval;
|
|
return (int)retval;
|
|
}
|
|
}
|