|
@@ -418,7 +418,19 @@ readMonitoredItems(UA_Server *server, const UA_NodeId *sessionId, void *sessionC
|
|
|
UA_UInt32 subscriptionId = *((UA_UInt32*)(input[0].data));
|
|
|
UA_Subscription* subscription = UA_Session_getSubscriptionById(session, subscriptionId);
|
|
|
if(!subscription)
|
|
|
- return UA_STATUSCODE_BADSUBSCRIPTIONIDINVALID;
|
|
|
+ {
|
|
|
+ if(LIST_EMPTY(&session->serverSubscriptions))
|
|
|
+ {
|
|
|
+ UA_Variant_setArray(&output[0], UA_Array_new(0, &UA_TYPES[UA_TYPES_UINT32]),
|
|
|
+ 0, &UA_TYPES[UA_TYPES_UINT32]);
|
|
|
+ UA_Variant_setArray(&output[1], UA_Array_new(0, &UA_TYPES[UA_TYPES_UINT32]),
|
|
|
+ 0, &UA_TYPES[UA_TYPES_UINT32]);
|
|
|
+
|
|
|
+ return UA_STATUSCODE_BADNOMATCH;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ return UA_STATUSCODE_BADSUBSCRIPTIONIDINVALID;
|
|
|
+ }
|
|
|
|
|
|
UA_UInt32 sizeOfOutput = 0;
|
|
|
UA_MonitoredItem* monitoredItem;
|