Explorar o código

attempts to fix stateless #157

Stasik0 %!s(int64=10) %!d(string=hai) anos
pai
achega
a4298439a4
Modificáronse 2 ficheiros con 5 adicións e 5 borrados
  1. 3 3
      src/server/ua_server_binary.c
  2. 2 2
      src/server/ua_services_attribute.c

+ 3 - 3
src/server/ua_server_binary.c

@@ -210,15 +210,15 @@ static void processMSG(UA_Connection *connection, UA_Server *server, const UA_By
     if(clientSession == &anonymousSession) {
     	//subtract UA_ENCODINGOFFSET_BINARY for binary encoding
     	switch(requestType.identifier.numeric - UA_ENCODINGOFFSET_BINARY) {
-    	case UA_READREQUEST_NS0:
+    	case UA_NS0ID_READREQUEST:
     		INVOKE_SERVICE(Read);
     		break;
 
-    	case UA_WRITEREQUEST_NS0:
+    	case UA_NS0ID_WRITEREQUEST:
     		INVOKE_SERVICE(Write);
     		break;
 
-    	case UA_BROWSEREQUEST_NS0:
+    	case UA_NS0ID_BROWSEREQUEST:
     		INVOKE_SERVICE(Browse);
     		break;
 

+ 2 - 2
src/server/ua_services_attribute.c

@@ -230,12 +230,12 @@ void Service_Read(UA_Server *server, UA_Session *session, const UA_ReadRequest *
 
 		UA_Variant variant;
 		UA_Variant_init(&variant);
-		variant.vt = &UA_TYPES[UA_DATETIME];
+		variant.type = &UA_TYPES[UA_TYPES_DATETIME];
 		variant.storage.data.arrayLength = request->nodesToReadSize;
 
 		UA_DateTime* expireArray = UA_NULL;
 		UA_Array_new((void**)&expireArray, request->nodesToReadSize,
-												&UA_TYPES[UA_DATETIME]);
+												&UA_TYPES[UA_TYPES_DATETIME]);
 		variant.storage.data.dataPtr = expireArray;
 
 		UA_ByteString str;