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