Explorar o código

Datatypes are compatible if they are of the same type

Stefan Profanter %!s(int64=7) %!d(string=hai) anos
pai
achega
523c62e172
Modificáronse 1 ficheiros con 4 adicións e 0 borrados
  1. 4 0
      src/server/ua_services_attribute.c

+ 4 - 0
src/server/ua_services_attribute.c

@@ -83,6 +83,10 @@ compatibleDataType(UA_Server *server, const UA_NodeId *dataType,
     if(UA_NodeId_isNull(constraintDataType))
         return true;
 
+    /* Same datatypes */
+    if (UA_NodeId_equal(dataType, constraintDataType))
+        return true;
+
     /* Variant allows any subtype */
     if(UA_NodeId_equal(constraintDataType, &UA_TYPES[UA_TYPES_VARIANT].typeId))
         return true;