load of tiny listing fixes, undef, unused, etc

This commit is contained in:
Dave Conway-Jones
2016-04-09 18:00:14 +01:00
parent 37ba29484a
commit 48bcd3c7df
22 changed files with 532 additions and 535 deletions

View File

@@ -1,6 +1,6 @@
{
"name" : "node-red-node-snmp",
"version" : "0.0.5",
"version" : "0.0.6",
"description" : "A Node-RED node that looks for SNMP oids.",
"dependencies" : {
"net-snmp" : "1.1.13"

View File

@@ -65,6 +65,7 @@ module.exports = function(RED) {
this.oids = n.oids.replace(/\s/g,"");
this.session = snmp.createSession (this.host, this.community, {version: this.version});
var node = this;
var msg;
var maxRepetitions = 20;
function sortInt (a, b) {
@@ -101,7 +102,8 @@ module.exports = function(RED) {
node.send(msg);
}
}
this.on("input",function(msg) {
this.on("input",function(m) {
msg = m;
var oids = node.oids || msg.oid;
if (oids) {
msg.oid = oids;