Parcourir la source

Copy endpoints correctly into the CreateSessionResponse

Mark il y a 7 ans
Parent
commit
a1667131b7
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      src/server/ua_services_session.c

+ 1 - 1
src/server/ua_services_session.c

@@ -116,7 +116,7 @@ void Service_CreateSession(UA_Server *server, UA_SecureChannel *channel,
     /* Copy the server's endpointdescriptions into the response */
     for(size_t i = 0; i < server->config.endpointsSize; ++i)
         response->responseHeader.serviceResult |=
-            UA_EndpointDescription_copy(&server->config.endpoints[0].endpointDescription,
+            UA_EndpointDescription_copy(&server->config.endpoints[i].endpointDescription,
                                         &response->serverEndpoints[i]);
     if(response->responseHeader.serviceResult != UA_STATUSCODE_GOOD)
         return;