Commit 78a8aff0 authored by fionera's avatar fionera

Missed the -1

parent 7ef49b15
......@@ -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);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment