Quellcode durchsuchen

Datatypes are compatible if they are of the same type

Stefan Profanter vor 7 Jahren
Ursprung
Commit
523c62e172
1 geänderte Dateien mit 4 neuen und 0 gelöschten Zeilen
  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;