Missed the -1
This commit is contained in:
parent
7ef49b15d6
commit
78a8aff0f4
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue