Browse Source

do not overwrite endpoint uri

Stasik0 10 years ago
parent
commit
a1671e42da
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/server/ua_server.c

+ 2 - 1
src/server/ua_server.c

@@ -62,7 +62,8 @@ void UA_Server_addNetworkLayer(UA_Server *server, UA_ServerNetworkLayer networkL
                        &server->description.discoveryUrls[server->description.discoveryUrlsSize]);
         server->description.discoveryUrlsSize++;
         for(UA_Int32 i = 0; i < server->endpointDescriptionsSize; i++)
-            UA_String_copy(networkLayer.discoveryUrl, &server->endpointDescriptions[i].endpointUrl);
+            if(!server->endpointDescriptions[i].endpointUrl.data)
+                UA_String_copy(networkLayer.discoveryUrl, &server->endpointDescriptions[i].endpointUrl);
     }
 }