I have written a scalar handler that takes up to 500ms to return. It works for single GET requests. It is the same function for several OIDs.
If I send multiple GET requests (one request with 2 OIDs), it sometimes doesn't work. To understand what could be the problem, I want to know if the handler can be called the second time (for the second OID in the request) even if the first call (for the first OID) hasn't returned yet. Analyzing some debug messages, it seems this scenario is possible. In the handler I communicate with a local socket with write(), select() and read() standard functions. The select() has a timeout of 500ms and the other end of the socket could take some time to answer (up to 500ms). I think snmpd could call again my handler for the second OID during the select(). Is it correct? In this case, even the second handler (the same code of the first) will write to the socket. I'm asking if the two messages on the socket could arrive corrupted. For example, if the first message is "Message1" and the second is "Message2", is it possible the other end of the socket receives an overlapped messages, such as "MessMessage2age1"? ------------------------------------------------------------------------------ LogMeIn Central: Instant, anywhere, Remote PC access and management. Stay in control, update software, and manage PCs from one command center Diagnose problems and improve visibility into emerging IT issues Automate, monitor and manage. Do more in less time with Central http://p.sf.net/sfu/logmein12331_d2d _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders