On Tue, 19 Oct 2004 17:07:56 -0200 Ivens wrote:
IP> Robert Story (Coders) wrote:
IP> > On Tue, 19 Oct 2004 14:58:30 -0200 Ivens wrote:
IP> > IP> I'm embedding an agentx sub-agent in my application and now I would
IP> > IP> like to make my sub-agent became a master agent when a master agent
IP> > IP> is not present.
IP> > 
IP> > Interesting idea, but I'm not sure it will work. The double call to init
IP> > will probably cause unexpected results.
IP> 
IP> What if I shut everything down before restarting as an agent? Would 
IP> calling snmp_shutdown() solve the problem?

I was hoping you wouldn't ask that.

In theory, yes, that should work. However, since the agent exists when shutting
down, not a whole lot of work has gone into testing and working out the kinks
of snmp_shutdown. We've always relied on the OS to clean up memory on exit,
so the shutdown routine probably doesn't free everything. I think, i fyou
look at the code, it is actually ifdef'd out because of a double-free that
nobody has tracked down yet.

Depending on your configuration and OS, it might work for you. If not, and you
don't mind getting dirty with code, fire up a debugger and dig into the code.
It would be great if someone had the time to clean up that code and send us
some patches.

-- 
Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/>
<irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to