Procházet zdrojové kódy

Datatypes are compatible if they are of the same type

Stefan Profanter před 7 roky
rodič
revize
523c62e172
1 změnil soubory, kde provedl 4 přidání a 0 odebrání
  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;