Sfoglia il codice sorgente

Fixed error in setting timestamps in previous commit.

ichrispa 9 anni fa
parent
commit
70571fdc76
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  1. 3 2
      src/server/ua_subscription.c

+ 3 - 2
src/server/ua_subscription.c

@@ -357,8 +357,9 @@ int MonitoredItem_QueueToDataChangeNotifications(UA_MonitoredItemNotification *d
         dst[queueSize].value.hasServerPicoseconds = UA_FALSE;
         dst[queueSize].value.hasServerTimestamp   = UA_TRUE;
         dst[queueSize].value.serverTimestamp      = UA_DateTime_now();
-        dst[queueSize].value.hasSourcePicoseconds = UA_TRUE;
-        dst[queueSize].value.hasSourceTimestamp   = UA_DateTime_now();
+        dst[queueSize].value.hasSourcePicoseconds = UA_FALSE;
+        dst[queueSize].value.hasSourceTimestamp   = UA_TRUE;
+        dst[queueSize].value.sourceTimestamp      = UA_DateTime_now();
         dst[queueSize].value.hasValue             = UA_TRUE;
         dst[queueSize].value.status = UA_STATUSCODE_GOOD;