Type of snmp_enableauthentraps variable is changed from int to long.
This fixes the bug with writing to snmpEnableAuthenTraps if server is
compiled for 64bit (snmpset reports wrong length). This bug was
introduced a long time ago (by faeecd0 commit).

Actually this is a 'less effort' type of fix but I wonder why we need a
long to store an INTEGER in the first place?

Signed-off-by: Ilya Yanok <[email protected]>
---
 agent/agent_trap.c                  |    2 +-
 agent/mibgroup/mibII/snmp_mib.c     |    2 +-
 agent/mibgroup/mibII/snmp_mib_5_5.c |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/agent/agent_trap.c b/agent/agent_trap.c
index 8c8c64f..3fa26f3 100644
--- a/agent/agent_trap.c
+++ b/agent/agent_trap.c
@@ -112,7 +112,7 @@ char           *snmp_trapcommunity = NULL;
 #define SNMP_AUTHENTICATED_TRAPS_ENABLED       1
 #define SNMP_AUTHENTICATED_TRAPS_DISABLED      2
 
-int             snmp_enableauthentraps = SNMP_AUTHENTICATED_TRAPS_DISABLED;
+long            snmp_enableauthentraps = SNMP_AUTHENTICATED_TRAPS_DISABLED;
 int             snmp_enableauthentrapsset = 0;
 
 /*
diff --git a/agent/mibgroup/mibII/snmp_mib.c b/agent/mibgroup/mibII/snmp_mib.c
index 098dfa3..0985e95 100644
--- a/agent/mibgroup/mibII/snmp_mib.c
+++ b/agent/mibgroup/mibII/snmp_mib.c
@@ -13,7 +13,7 @@ netsnmp_feature_require(check_vb_truthvalue)
 
 static const oid snmp_oid[] = { 1, 3, 6, 1, 2, 1, 11 };
 
-extern int snmp_enableauthentraps;
+extern long snmp_enableauthentraps;
 extern int snmp_enableauthentrapsset;
 
 static int
diff --git a/agent/mibgroup/mibII/snmp_mib_5_5.c 
b/agent/mibgroup/mibII/snmp_mib_5_5.c
index 3a04cab..3ffc757 100644
--- a/agent/mibgroup/mibII/snmp_mib_5_5.c
+++ b/agent/mibgroup/mibII/snmp_mib_5_5.c
@@ -18,7 +18,7 @@ netsnmp_feature_require(check_vb_truthvalue)
 
 static oid snmp_oid[] = { SNMP_OID };
 
-extern int snmp_enableauthentraps;
+extern long snmp_enableauthentraps;
 extern int snmp_enableauthentrapsset;
 
 static int
-- 
1.7.5.4


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to