Fix bug in GetParameterNames method

This commit is contained in:
Zaid Abdulla committed 2016-08-24 19:00:24 -07:00
1 parent 3fe418e0c8
commit 1fe46061e0
1 file changed
+5 -1
+5 -1
View File
@@ -513,7 +513,7 @@ generateRpcRequest = (sessionData) ->
rpcReq = { rpcReq = {
type: 'GetParameterNames' type: 'GetParameterNames'
parameterPath: pair[0].join('.') parameterPath: pair[0].concat('').join('.')
nextLevel: nextLevel nextLevel: nextLevel
} }
@@ -1011,7 +1011,11 @@ rpcResponse = (sessionData, id, rpcRes, callback) ->
when 'GetParameterNamesResponse' when 'GetParameterNamesResponse'
return callback(new Error('Response type does not match request type')) if rpcReq.type isnt 'GetParameterNames' return callback(new Error('Response type does not match request type')) if rpcReq.type isnt 'GetParameterNames'
if rpcReq.parameterPath.endsWith('.')
root = common.parsePath(rpcReq.parameterPath.slice(0, -1))
else
root = common.parsePath(rpcReq.parameterPath) root = common.parsePath(rpcReq.parameterPath)
params = [] params = []
params.push([root.concat('*'), {exist: timestamp}]) params.push([root.concat('*'), {exist: timestamp}])