Skip to content

Commit

Permalink
covering a case when subscription has no monitored item
Browse files Browse the repository at this point in the history
  • Loading branch information
Stasik0 committed Jul 13, 2016
1 parent bba8c4b commit d02e298
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/ua_server.c
Expand Up @@ -463,6 +463,9 @@ GetMonitoredItems(void *handle, const UA_NodeId objectId, size_t inputSize,
LIST_FOREACH(monitoredItem, &subscription->MonitoredItems, listEntry) {
sizeOfOutput++;
}
if(sizeOfOutput==0)
return UA_STATUSCODE_GOOD;

UA_UInt32* clientHandles = UA_Array_new(sizeOfOutput, &UA_TYPES[UA_TYPES_UINT32]);
UA_UInt32* serverHandles = UA_Array_new(sizeOfOutput, &UA_TYPES[UA_TYPES_UINT32]);
UA_UInt32 i = 0;
Expand Down

0 comments on commit d02e298

Please sign in to comment.