From: SourceForge.net <no...@so...> - 2011-09-21 20:26:49
|
Patches item #3411958, was opened at 2011-09-20 20:48 Message generated for change (Comment added) made by bvassche You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=3411958&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Timothy Miller (theosib) Assigned to: Nobody/Anonymous (nobody) Summary: 5.7.1.pre2: Don't use timerisset for min timer Initial Comment: I'm investigating possibly a related bug, where I set a timeout for a session, and that timeout value is not respected. I noticed something. In snmp_api.c, there's this code, starting at line 6034: for (rp = slp->internal->requests; rp; rp = rp->next_request) { if ((!timerisset(&earliest) || (timercmp(&rp->expire, &earliest, <)))) { earliest = rp->expire; DEBUGMSG(("verbose:sess_select","(to in %d.%06d sec) ", (int)earliest.tv_sec, (int)earliest.tv_usec)); } } The idea is that if the timer has never been set, then set it to the first one that comes along. Otherwise, compare them and choose the lesser. However, if one of the pending requests has an expire value of zero, then this will "clear" the timer, and then the next request to be examined will picked, and this would certainly be greater than the minimum (which is zero in this scenario). ---------------------------------------------------------------------- >Comment By: (bvassche) Date: 2011-09-21 22:26 Message: How about the attached patch (not tested) ? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=3411958&group_id=12694 |