[AGENT++] Agent++ Problem and Multithreaded intial loop
Gerhard Wiesinger
lists at wiesinger.com
Wed Feb 4 18:18:53 CET 2004
Hello!
SNMP++ works great when I do the main loop in the main Thread.
while (!m_Break)
{
req = reqList->receive(2);
if (req)
{
mib->process_request(req);
}
else
{
mib->cleanup();
}
}
But I have too run the AGENT++ in a separate thread (because of other
tasks)
Problem is when I start the above code in a separate thread, that
reqList->receive(2);
returns immediatly.
Of course all Code is compiled multithreaded.
Platform is Win32 with Visual C++ 6.0 SP 5 but it should work on Linux
too. (We have some sort of thread abstraction which works well).
Debugging:
Snmpx::receive
iv_snmp_session is 3435973836 and max_fd is then negative (maybe
conversion to int?)
and nfound = select(max_fd+1, &readfds, 0, 0, tvptr);
returns -1.
Any ideas?
Thank you for the answer.
Ciao,
Gerhard
More information about the AGENTPP
mailing list