浏览代码

fixes issue #120 properly

Stasik0 10 年之前
父节点
当前提交
d8403e9e26
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/server/ua_services_attribute.c

+ 2 - 2
src/server/ua_services_attribute.c

@@ -99,7 +99,7 @@ static UA_DataValue service_read_node(Application *app, const UA_ReadValueId *id
 		break;
 
 	case UA_ATTRIBUTEID_ISABSTRACT:
-		CHECK_NODECLASS(UA_NODECLASS_REFERENCETYPE | UA_NODECLASS_OBJECTTYPE);
+		CHECK_NODECLASS(UA_NODECLASS_REFERENCETYPE | UA_NODECLASS_OBJECTTYPE | UA_NODECLASS_VARIABLETYPE | UA_NODECLASS_DATATYPE);
 		v.encodingMask = UA_DATAVALUE_ENCODINGMASK_VARIANT;
 		retval |=
 		    UA_Variant_copySetValue(&v.value, &UA_.types[UA_BOOLEAN],
@@ -135,7 +135,7 @@ static UA_DataValue service_read_node(Application *app, const UA_ReadValueId *id
 		break;
 
 	case UA_ATTRIBUTEID_VALUE:
-		CHECK_NODECLASS(UA_NODECLASS_VARIABLE);
+		CHECK_NODECLASS(UA_NODECLASS_VARIABLE | UA_NODECLASS_VARIABLETYPE);
 		v.encodingMask = UA_DATAVALUE_ENCODINGMASK_VARIANT;
 		// TODO: Ensure that the borrowed value is not freed prematurely (multithreading)
 		/* retval |= UA_Variant_borrowSetValue(&v.value, &UA_.types[UA_VARIANT], */