|
@@ -499,13 +499,14 @@ __MonitoredItems_create_handler(UA_Client *client, void *d, UA_UInt32 requestId,
|
|
/* Add internally */
|
|
/* Add internally */
|
|
for(size_t i = 0; i < request->itemsToCreateSize; i++) {
|
|
for(size_t i = 0; i < request->itemsToCreateSize; i++) {
|
|
if(response->results[i].statusCode != UA_STATUSCODE_GOOD) {
|
|
if(response->results[i].statusCode != UA_STATUSCODE_GOOD) {
|
|
- if (deleteCallbacks[i])
|
|
|
|
|
|
+ if(deleteCallbacks[i])
|
|
deleteCallbacks[i](client, sub->subscriptionId, sub->context, 0, contexts[i]);
|
|
deleteCallbacks[i](client, sub->subscriptionId, sub->context, 0, contexts[i]);
|
|
UA_free(mis[i]);
|
|
UA_free(mis[i]);
|
|
mis[i] = NULL;
|
|
mis[i] = NULL;
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ UA_assert(mis[i] != NULL);
|
|
UA_Client_MonitoredItem *newMon = mis[i];
|
|
UA_Client_MonitoredItem *newMon = mis[i];
|
|
newMon->clientHandle = request->itemsToCreate[i].requestedParameters.clientHandle;
|
|
newMon->clientHandle = request->itemsToCreate[i].requestedParameters.clientHandle;
|
|
newMon->monitoredItemId = response->results[i].monitoredItemId;
|
|
newMon->monitoredItemId = response->results[i].monitoredItemId;
|
|
@@ -522,6 +523,7 @@ __MonitoredItems_create_handler(UA_Client *client, void *d, UA_UInt32 requestId,
|
|
sub->subscriptionId, newMon->clientHandle);
|
|
sub->subscriptionId, newMon->clientHandle);
|
|
mis[i] = NULL;
|
|
mis[i] = NULL;
|
|
}
|
|
}
|
|
|
|
+
|
|
cleanup:
|
|
cleanup:
|
|
MonitoredItems_CreateData_deleteItems(data, client);
|
|
MonitoredItems_CreateData_deleteItems(data, client);
|
|
if(cc->isAsync) {
|
|
if(cc->isAsync) {
|