mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
snmp - ensure response defined.
This commit is contained in:
parent
9164fc234c
commit
75a4361435
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name" : "node-red-node-snmp",
|
"name" : "node-red-node-snmp",
|
||||||
"version" : "1.0.3",
|
"version" : "1.0.4",
|
||||||
"description" : "A Node-RED node that gets and sets SNMP oid values. Supports v1, v2c and v3",
|
"description" : "A Node-RED node that gets and sets SNMP oid values. Supports v1, v2c and v3",
|
||||||
"dependencies" : {
|
"dependencies" : {
|
||||||
"net-snmp" : "^3.8.2"
|
"net-snmp" : "^3.8.2"
|
||||||
|
@ -440,6 +440,7 @@ module.exports = function (RED) {
|
|||||||
node.on("input", function (msg) {
|
node.on("input", function (msg) {
|
||||||
const oids = node.oids || msg.oid;
|
const oids = node.oids || msg.oid;
|
||||||
const { host, sessionid, user, options } = prepareSnmpOptions(node, msg);
|
const { host, sessionid, user, options } = prepareSnmpOptions(node, msg);
|
||||||
|
const response = [];
|
||||||
function feedCb(varbinds) {
|
function feedCb(varbinds) {
|
||||||
for (let i = 0; i < varbinds.length; i++) {
|
for (let i = 0; i < varbinds.length; i++) {
|
||||||
if (SNMP.isVarbindError(varbinds[i])) {
|
if (SNMP.isVarbindError(varbinds[i])) {
|
||||||
|
Loading…
Reference in New Issue
Block a user