On 08/01/12 00:11, Wes Hardaker wrote: > > Get it, test it, smile at it: > > http://www.net-snmp.org/download.html > > See the ChangeLog file for details on what's changed since pre2. > Hopefully this will be the last pre-release, so test it well!
Sorry for jumping in late, but this is what I came up with after inspection of recent commits and of compiler warnings: [PATCH] Make snmp_alarm_reset() use the monotonic clock. Fixes a bug introduced in commit 37ba7e2. --- snmplib/snmp_alarm.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/snmplib/snmp_alarm.c b/snmplib/snmp_alarm.c index 2bed22f..c015102 100644 --- a/snmplib/snmp_alarm.c +++ b/snmplib/snmp_alarm.c @@ -474,7 +474,7 @@ snmp_alarm_reset(unsigned int clientreg) struct snmp_alarm *a; struct timeval t_now; if ((a = sa_find_specific(clientreg)) != NULL) { - gettimeofday(&t_now, NULL); + netsnmp_get_monotonic_clock(&t_now); a->t_lastM.tv_sec = t_now.tv_sec; a->t_lastM.tv_usec = t_now.tv_usec; a->t_nextM.tv_sec = 0; [PATCH] Make get_exec_output() work on big endian systems. --- agent/mibgroup/util_funcs.c | 2 +- agent/mibgroup/utilities/execute.c | 1 + agent/mibgroup/utilities/execute.h | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/agent/mibgroup/util_funcs.c b/agent/mibgroup/util_funcs.c index 94b34bd..4c34c32 100644 --- a/agent/mibgroup/util_funcs.c +++ b/agent/mibgroup/util_funcs.c @@ -243,7 +243,7 @@ get_exec_output(struct extensible *ex) #if HAVE_EXECV char cachefile[STRMAX]; char cache[NETSNMP_MAXCACHESIZE]; - size_t cachebytes; + int cachebytes; int cfd; #ifdef NETSNMP_EXCACHETIME long curtime; diff --git a/agent/mibgroup/utilities/execute.c b/agent/mibgroup/utilities/execute.c index b2d0bad..68f3654 100644 --- a/agent/mibgroup/utilities/execute.c +++ b/agent/mibgroup/utilities/execute.c @@ -35,6 +35,7 @@ #include <net-snmp/agent/net-snmp-agent-includes.h> #include <ucd-snmp/errormib.h> +#include "execute.h" #include "struct.h" #define setPerrorstatus(x) snmp_log_perror(x) diff --git a/agent/mibgroup/utilities/execute.h b/agent/mibgroup/utilities/execute.h index d52dfdc..3c9e84b 100644 --- a/agent/mibgroup/utilities/execute.h +++ b/agent/mibgroup/utilities/execute.h @@ -4,8 +4,8 @@ config_belongs_in(agent_module) int run_shell_command(char *command, char *input, - char *output, size_t *out_len); + char *output, int *out_len); int run_exec_command( char *command, char *input, - char *output, size_t *out_len); + char *output, int *out_len); #endif /* _MIBGROUP_EXECUTE_H */ ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders