Hello,
I developed a netsnmp a sync application.
while (activeHost)
{
int fds = 0, block = 1;
fd_set fdset;
struct timeval timeout;
FD_ZERO(&fdset);
//get info regarding opened sockets.......
snmp_select_info(&fds, &fdset, &timeout, &block);
fds = select(fds, &fdset, NULL, NULL, block ? NULL : &timeout);
if (fds < 0)
{
//Failed to get it....
return;
}
if (fds)
snmp_read(&fdset);//Read the correspoding socket data...
else
snmp_timeout();//Failed to get data with in time out...
}
I the wile block I am checking for the pending read request.
Some time to logic going to never ending task. Active host or no goinng to
zero. Is there any better method to break this loop.
Plese repond immedetely.
Thanks.
________________________________
Important notice: This e-mail and any attachment there to contains corporate
proprietary information. If you have received it by mistake, please notify us
immediately by reply e-mail and delete this e-mail and its attachments from
your system.
Thank You.
------------------------------------------------------------------------------
This SF.net Dev2Dev email is sponsored by:
Show off your parallel programming skills.
Enter the Intel(R) Threading Challenge 2010.
http://p.sf.net/sfu/intel-thread-sfd
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders