From ebca49660d5635163bf67e199f6fc467256ecba3 Mon Sep 17 00:00:00 2001 From: Peter Faller Date: Tue, 13 Sep 2016 11:48:23 +0000 Subject: [PATCH 1/2] Allow for specific_trap === 0 --- lib/protocol/pdu.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/protocol/pdu.js b/lib/protocol/pdu.js index 0a7e170..892a2c9 100644 --- a/lib/protocol/pdu.js +++ b/lib/protocol/pdu.js @@ -291,8 +291,9 @@ SnmpTrapV1PDU(arg) this.agent_addr = arg.agent_addr; if (arg.generic_trap) this.generic_trap = arg.generic_trap; - if (arg.specific_trap) - this.specific_trap = arg.specific_trap; + // issue #247 + // if (arg.specific_trap) + this.specific_trap = arg.specific_trap || 0; if (arg.time_stamp) this.time_stamp = arg.time_stamp; } From 11683e09418e12dd5e76333b3c9f1fab7626a467 Mon Sep 17 00:00:00 2001 From: peterfaller Date: Tue, 13 Sep 2016 13:53:53 +0200 Subject: [PATCH 2/2] Allow for specific_trap being 0 See issue #297 --- lib/protocol/pdu.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/protocol/pdu.js b/lib/protocol/pdu.js index 0a7e170..d184c3b 100644 --- a/lib/protocol/pdu.js +++ b/lib/protocol/pdu.js @@ -291,8 +291,9 @@ SnmpTrapV1PDU(arg) this.agent_addr = arg.agent_addr; if (arg.generic_trap) this.generic_trap = arg.generic_trap; - if (arg.specific_trap) - this.specific_trap = arg.specific_trap; + // issue #297 + // if (arg.specific_trap) + this.specific_trap = arg.specific_trap || 0; if (arg.time_stamp) this.time_stamp = arg.time_stamp; }