Quellcode durchsuchen

Resolve port conflict

Registering server complains that the port 4840 is already in use (as the LDS is
running there).

./discovery_server_register
[...]
[2019-02-04 22:45:20.070 (UTC+0100)] info/userland      Node read the.answer
[2019-02-04 22:45:20.070 (UTC+0100)] info/userland      read value 42
[2019-02-04 22:45:20.070 (UTC+0100)] warn/network       Error binding a server socket: Address already in use
[2019-02-04 22:45:20.070 (UTC+0100)] warn/network       Error binding a server socket: Address already in use
[2019-02-04 22:45:20.070 (UTC+0100)] info/network       TCP network layer listening on opc.tcp://prokyon:4840/
Frank Meerkoetter vor 6 Jahren
Ursprung
Commit
9b9ecfee5d
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  1. 1 1
      examples/discovery/server_register.c

+ 1 - 1
examples/discovery/server_register.c

@@ -61,7 +61,7 @@ int main(int argc, char **argv) {
     signal(SIGINT, stopHandler); /* catches ctrl-c */
     signal(SIGTERM, stopHandler);
 
-    UA_ServerConfig *config = UA_ServerConfig_new_default();
+    UA_ServerConfig *config = UA_ServerConfig_new_minimal(4841, NULL);;
     UA_String_clear(&config->applicationDescription.applicationUri);
     config->applicationDescription.applicationUri =
         UA_String_fromChars("urn:open62541.example.server_register");