snmp_select_info() and changing system time

"Ray Chang" <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
Hi,

 

I'm new to the mailing list and have searched the archive.

We implemented a AgentX subagent using the net-snmp package. In our main
loop (servicing RPC), we query the subagent using the snmp_api function
snmp_select_info  so we can give the subagent code some cycles when the
next timeout fires (using tv to set up our timer). Normally, I see
returned arguments saying the next timeout is either 1 or 14 seconds,
and "block" is usually non-blcking (i.e. = 0).

 

Now, if I set my system clock to Jan 1 of this year (10 months ago), I
get a huge number for time value tv like the next timers is not going to
expire in 10 months! 

My questions are:

(1)    Is this actually happening? If it is, I assume it is harmful,
i.e., things will not time out or stay blocked or stuck for a long time.

(2)    Any way to avoid this problem?  I see there is a
"HAVE_GETTIMEOFDAY" switch, but it doesn't do anything.

 

 

My printf:

after snmp_select_info() -------- block=0  tv.tv_sec=1
// normal

 

after snmp_select_info() -------- block=0  tv.tv_sec=24278390      //
after changing system time to 1/1/08

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.