mirror of
https://github.com/node-red/node-red-nodes.git
synced 2025-03-01 10:37:43 +00:00
load of tiny listing fixes, undef, unused, etc
This commit is contained in:
@@ -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"
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user