This last one even I understand :-).
I noticed in the first patch you assumed times() wraps to 0,
didn't you?
Putting together the original patch I assumed times()
wraps to INT_MIN. It would make more sense (to me) if it wrapped
to 0 (makes the -1 fault code return value more understandable).
Still "clock_t" is defined to "long int" so it is not quite clear.
Anybody knows for sure?
if (now < snmpv3startClock) {
result = UINT_MAX - snmpv3startClock + now;
} else {
result = now - snmpv3startClock;
}
The patch seems OK if times() wraps to INT_MIN.
But if it wraps to 0 shouldn't UINT_MAX be INT_MAX?
My guess is that it wraps to INT_MIN but I have not been able
to check this (but then everything should be OK).
There's still a "lumentis" comment in the file. Nice of you to keep
it but it's just my little note to find our private changes more easily
so no need to have it in the distribution.
> Wes> Yep. It's a known annoying bug. Unfortunately, the reason I
> Wes> haven't applied it is that I haven't had the time. The patch
> Wes> proposed is better but also suffers from additional problems:
> A much better patch was checked in than the obnoxious one I wrote
> earlier.
> --
> Wes Hardaker
> Sparta
All the best,
M
---
Martin Carlsson, martin dot carlsson at lumentis dot se
Lumentis AB, Jakobsdalsvagen 17, SE-126 53 Hagersten, Sweden
+46 (0)8 52 76 75 66, Fax: +46 (0)8 52 76 75 99
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders