Fixed bug in addObject task where a given parameter value may be set to all descendant parameters wth the same name.

This commit is contained in:
Zaid Abdulla committed 2015-05-26 00:44:50 +03:00
1 parent c70354997a
commit 4ad8aa5a1b
1 file changed
+1 -1
+1 -1
View File
@@ -252,7 +252,7 @@ this.addObject = (task, methodResponse, callback) ->
if deviceUpdates and deviceUpdates.parameterValues? if deviceUpdates and deviceUpdates.parameterValues?
for p1 in deviceUpdates.parameterValues for p1 in deviceUpdates.parameterValues
for p2 in task.parameterValues for p2 in task.parameterValues
if common.endsWith(p1[0], ".#{p2[0]}") if p1[0] == "#{task.objectName}.#{task.session.instanceNumber}.#{p2[0]}"
t = if p2[2] then p2[2] else p1[2] t = if p2[2] then p2[2] else p1[2]
v = common.matchType(p1[1], p2[1]) v = common.matchType(p1[1], p2[1])
# TODO only include if writable # TODO only include if writable