[AGENT++] Socket file descriptor isn't closed
James McDonnell
jmcdonnell at slipstream.com
Thu Sep 15 22:44:47 CEST 2005
Hi,
I've created a sub-agent using AgentX 1.4.12c with the code setup to
re-establish the connection as recommended on page 26 of
http://www.agentpp.com/agentX++/AgentX++1.4.8.pdf. This code seems to have
a problem though in that it doesn't do a close on the file descriptor for
the previous connection. So even though that connection is terminated the
file descriptor remains in use in the sub-agent. Is there some way to fully
shut down the previous connection?
I also had another problem which you might wish to know about. I'm using
the code on a FreeBSD system and I found that the connect call in
AgentXSlave::bind_tcp failed when compiled with SNMP_PP_IPv6 defined. The
connect function didn't seem to like the fact that sizeof(sockaddr_storage)
was passed as the third parameter. I changed my copy of the code to pass
sizeof(sockaddr_in) or sizeof(sockaddr_in6) as appropriate.
Thanks,
James McDonnell
More information about the AGENTPP
mailing list