|
@@ -269,7 +269,6 @@ sampleCallbackWithValue(UA_Server *server, UA_Subscription *sub,
|
|
|
} else {
|
|
|
newNotification->data.value = *value; /* Just copy the value and do not release it */
|
|
|
}
|
|
|
- newNotification->clientHandle = monitoredItem->clientHandle;
|
|
|
|
|
|
/* <-- Point of no return --> */
|
|
|
|
|
@@ -277,6 +276,8 @@ sampleCallbackWithValue(UA_Server *server, UA_Subscription *sub,
|
|
|
"Subscription %u | MonitoredItem %u | Sampled a new value",
|
|
|
sub->subscriptionId, monitoredItem->monitoredItemId);
|
|
|
|
|
|
+ newNotification->mon = monitoredItem;
|
|
|
+
|
|
|
/* Replace the encoding for comparison */
|
|
|
UA_ByteString_deleteMembers(&monitoredItem->lastSampledValue);
|
|
|
monitoredItem->lastSampledValue = *valueEncoding;
|
|
@@ -285,8 +286,6 @@ sampleCallbackWithValue(UA_Server *server, UA_Subscription *sub,
|
|
|
TAILQ_INSERT_TAIL(&monitoredItem->queue, newNotification, listEntry);
|
|
|
++monitoredItem->currentQueueSize;
|
|
|
|
|
|
- newNotification->mon = monitoredItem;
|
|
|
-
|
|
|
/* Remove entries from the queue if required and add the sample to the global queue */
|
|
|
MonitoredItem_ensureQueueSpace(sub, monitoredItem, newNotification);
|
|
|
|