[AGENT++] Agent++ Problem and Multithreaded intial loop

Gerhard Wiesinger lists at wiesinger.com
Fri Feb 6 07:38:19 CET 2004


On Wed, 4 Feb 2004, Jochen Katz wrote:

> Hi,
>
> > 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.
>
> 3435973836 is hex 0xcccccccc, which possibly is some sort of
> padding/default initial value for VC++. I assume some different compiler
> options for some part of your application.
>

Ok, I found the problem.

The Snmpx listener variable was on the Stack and I had to create it with
new (because of out of scope in the method where the listener was
created) ...

Thank you.

Ciao,
Gerhard



More information about the AGENTPP mailing list