freebsd-ports/net-mgmt/net-snmp/files/patch-snmplib__snmp_api.c
Ryan Steinmetz cf01e16940 - Fix problem that was reintroduced with the upgrade to 5.7.1 [1]
- Merge in upstream commits to resolve a handful of issues
  - 1421924b4852142192c5bb9e93ddbfed69e908fa [1]
  - 97172b311d20f4441c7a7e90092b59c1e0da99f7
  - 5fd26e4fa3e000ea9c81c38ab975b7946efe2157
  - cf82b894b2217c26edc6f1356351c932415604e2
- Bump PORTREVISION

PR:		ports/163069 [1]
Reported by:	Ryan Frederick <ryanrfrederick@gmail.com> [1]
Obtained from:	upstream repo
Feature safe:	yes
2011-12-07 22:58:31 +00:00

23 lines
1.1 KiB
C

--- ./snmplib/snmp_api.c.orig 2011-12-07 17:39:10.000000000 -0500
+++ ./snmplib/snmp_api.c 2011-12-07 17:46:39.000000000 -0500
@@ -704,6 +704,8 @@
netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID,
NETSNMP_DS_LIB_HEX_OUTPUT_LENGTH, 16);
+ netsnmp_ds_set_int(NETSNMP_DS_LIBRARY_ID, NETSNMP_DS_LIB_RETRIES,
+ DEFAULT_RETRIES);
#ifdef NETSNMP_USE_REVERSE_ASNENCODING
netsnmp_ds_set_boolean(NETSNMP_DS_LIBRARY_ID,
@@ -6032,8 +6034,9 @@
*/
requests++;
for (rp = slp->internal->requests; rp; rp = rp->next_request) {
- if ((!timerisset(&earliest)
- || (timercmp(&rp->expire, &earliest, <)))) {
+ if (!timerisset(&earliest)
+ || (timerisset(&rp->expire)
+ && timercmp(&rp->expire, &earliest, <))) {
earliest = rp->expire;
DEBUGMSG(("verbose:sess_select","(to in %d.%06d sec) ",
(int)earliest.tv_sec, (int)earliest.tv_usec));