Missed the -1

This commit is contained in:
Tim Windelschmidt 2016-09-27 21:54:49 +02:00
parent 7ef49b15d6
commit 78a8aff0f4
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}