diff --git a/node/snmp-mac.js b/node/snmp-mac.js index 4268a48..17b8795 100644 --- a/node/snmp-mac.js +++ b/node/snmp-mac.js @@ -62,12 +62,12 @@ var SnmpMac = function(hostname, community) { // console.log(mac); redisClient.get(redisprefix + mac, function(err, reply) { if(reply != null) { - if (reply.split('')[0] == '"' && reply.split('')[reply.split('').length] == '"') { + if (reply.split('')[0] == '"' && reply.split('')[reply.split('').length -1] == '"') { var name = ""; for (var i = 1; i < reply.split('').length - 1; i++){ name += reply.split('')[i] } - names.push() + names.push(name) } else { names.push(reply); }