From 1fe46061e0294ad96e7487e77245803aff92cd1d Mon Sep 17 00:00:00 2001 From: Zaid Abdulla Date: Wed, 24 Aug 2016 19:00:24 -0700 Subject: [PATCH] Fix bug in GetParameterNames method --- lib/session.coffee | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/session.coffee b/lib/session.coffee index a151fc6..6e49769 100644 --- a/lib/session.coffee +++ b/lib/session.coffee @@ -513,7 +513,7 @@ generateRpcRequest = (sessionData) -> rpcReq = { type: 'GetParameterNames' - parameterPath: pair[0].join('.') + parameterPath: pair[0].concat('').join('.') nextLevel: nextLevel } @@ -1011,7 +1011,11 @@ rpcResponse = (sessionData, id, rpcRes, callback) -> when 'GetParameterNamesResponse' return callback(new Error('Response type does not match request type')) if rpcReq.type isnt 'GetParameterNames' - root = common.parsePath(rpcReq.parameterPath) + if rpcReq.parameterPath.endsWith('.') + root = common.parsePath(rpcReq.parameterPath.slice(0, -1)) + else + root = common.parsePath(rpcReq.parameterPath) + params = [] params.push([root.concat('*'), {exist: timestamp}])