Переглянути джерело

Copy endpoints correctly into the CreateSessionResponse

Mark 7 роки тому
батько
коміт
a1667131b7
1 змінених файлів з 1 додано та 1 видалено
  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;