On Tue, 15 Feb 2005 17:11:04 -0800 Riju wrote:
RK> This fix didn't work for me. Infact, after applying this patch, snmpd
RK> process froze at the following location. The stack trace looks a bit
RK> weird though. According to the stack trace the process got stuck in a
RK> call to free().
Oops. Sorry about that.. Forgot to dup the string. Try this instead:
Index: mibgroup/agentx/master_admin.c
===================================================================
RCS file:
/cvsroot/net-snmp/net-snmp/agent/mibgroup/agentx/master_admin.c,v
retrieving revision 5.6
diff -u -r5.6 master_admin.c
--- mibgroup/agentx/master_admin.c 9 Nov 2002 15:06:40 -0000 5.6
+++ mibgroup/agentx/master_admin.c 15 Feb 2005 23:41:55 -0000
@@ -229,6 +229,9 @@
reg->handler->myvoid = session;
reg->global_cacheid = cacheid;
+ if (NULL != pdu->community)
+ reg->contextName = strdup(pdu->community);
+
/*
* register mib. Note that for failure cases, the registration info
* (reg) will be freed, and thus is no longer a valid pointer.
--
Robert Story; NET-SNMP Junkie
Support: <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.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders