Explorar o código

Unbreak the build (#1162)

* Unbreak the build

I suspect that this is a fallout from
commit a8012d3040f903ffd127d06c70c73cbc87379602
Author: Infinity95 <mark.giraud@student.kit.edu>
Date:   Thu Aug 10 19:00:32 2017 +0200

    endpoints in the server config; new/delete functions for the server config

* UA_ConnectionConfig_default already contains a network layer
Frank Meerkötter %!s(int64=7) %!d(string=hai) anos
pai
achega
3d874ad93b
Modificáronse 1 ficheiros con 2 adicións e 6 borrados
  1. 2 6
      examples/server_nodeset.c

+ 2 - 6
examples/server_nodeset.c

@@ -23,10 +23,7 @@ int main(int argc, char** argv) {
     signal(SIGINT, stopHandler); /* catches ctrl-c */
 
     /* 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);
 
     /* 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 "
                      "before any other namespace add calls.");
         UA_Server_delete(server);
-        nl.deleteMembers(&nl);
         return (int)UA_STATUSCODE_BADUNEXPECTEDERROR;
     }
 
@@ -44,6 +40,6 @@ int main(int argc, char** argv) {
 
     /* ctrl-c received -> clean up */
     UA_Server_delete(server);
-    nl.deleteMembers(&nl);
+    UA_ServerConfig_delete(config);
     return (int)retval;
 }