From 84e79bda9ed83879a79d9d369a7c6f3a00f05f0c Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Wed, 29 Mar 2017 17:28:42 -0700 Subject: [PATCH] Fix bug in testing preconditions and events The bug occurs when the session was serialized and deserialized as a result of requests coming through a new TCP connection. Resolves: #219 --- lib/cwmp.coffee | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/cwmp.coffee b/lib/cwmp.coffee index ac1dd17..4234bb7 100644 --- a/lib/cwmp.coffee +++ b/lib/cwmp.coffee @@ -237,6 +237,9 @@ applyPresets = (sessionContext) -> blackList[channel] = if fault.precondition then 1 else 2 + sessionContext.deviceData.timestamps.revision = 1 + sessionContext.deviceData.attributes.revision = 1 + deviceEvents = {} for p in sessionContext.deviceData.paths.find(['Events', '*'], false, true) if sessionContext.timestamp <= sessionContext.deviceData.attributes.get(p)?.value?[1][0]