On 4 February 2011 04:29, sujata patra <[email protected]> wrote:
> I  have problem of freeing the messageTable_head linked list. I found it
> frees everytime cache expires by calling messageTable_free(). But I do not
> want that to be freed everytime. It will be created at start time and want
> to be freed at shutdown.

You can do this by setting up the persistent elements within the "init_xxx()"
routine,   and freeing them within a (new) "shutdown_xxx()" routine.

Most MIB modules don't bother with a shutdown routine, but there
are increasing numbers that do.  See agent/mibgroup/mib_modules_shutdown.h
for a list.

Note that you'll need to re-run 'configure' to pick up this new shutdown method.
(Or tweak mib_modules_shutdown.h by hand!)

Dave

------------------------------------------------------------------------------
The modern datacenter depends on network connectivity to access resources
and provide services. The best practices for maximizing a physical server's
connectivity to a physical network are well understood - see how these
rules translate into the virtual world? 
http://p.sf.net/sfu/oracle-sfdevnlfb
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to