I didn't see a response to this old message, and I hope you solved the problem on your own. Just answering for the archives in case someone else ran into this same problem.
On Fri, 8 Jan 2010 15:51:40 +0100 Mario wrote: MG> When I uninitialize the subagent inside my application and later try a restart, it fails. MG> Further SNMP requests addressed to my subagent result in an error ("No such name"). MG> Note that in this scenario I do not exit the application that houses the subagent. If I do this, everything's fine again, but this is *not* an option. MG> MG> So the Question is: MG> How can I gracefully restart the subagent. MG> MG> MG> I tried several things to shutdown the subagent and clean up. MG> MG> 1) like in the example subagent, only calling MG> snmp_shutdown(MY_AGENT_NAME); MG> MG> When initializing again, i get the messages: MG> daemon.warn net-snmp[7094]: ignoring extra call to init_agent (2) MG> daemon.err net-snmp[2918]: netsnmp_assert !"registration != duplicate" failed /home_2/releases/rootfs_ipos_rel_2_2_0/build/ROOTFS/app/net-snmp/agent/agent_registry.c:536 netsnmp_subtree_load() MG> MG> 2) i do also unregister the handler created in the MIB table init function MG> netsnmp_unregister_handler(reg); I think the answer is to unregister but not shutdown. Have you tried that? The library wasn't really designed to be turned on and off within an application. If you really need to do that, I suggest putting the subagent in a child process that you can terminate and restart as needed. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders