On 12/10/06, Arnaud BODENAN <[EMAIL PROTECTED]> wrote:
Sure, I understand that.
I just try to figure out how difficult it would be to implement it myself.
OK - I give in.
Please see the attached patch.
Warning - this is *COMPLETELY* untested.
I haven't even checked to see that it compiles - let alone works - let
alone actually fixes the problem.
But this is the sort of approach I had in mind.
Apply it to agent/mibgroup/agentx/subagent.c
Dave
--- subagent.c.CLN 2006-10-12 13:59:30.000000000 +0100
+++ subagent.c 2006-10-12 14:01:24.000000000 +0100
@@ -741,6 +741,7 @@
{
netsnmp_transport *t;
netsnmp_session sess;
+ netsnmp_session *trap_session;
DEBUGMSGTL(("agentx/subagent", "opening session...\n"));
@@ -788,6 +789,9 @@
main_session =
snmp_add_full(&sess, t, NULL, agentx_parse, NULL, NULL,
agentx_realloc_build, agentx_check_packet, NULL);
+ trap_session =
+ snmp_add_full(&sess, t, NULL, agentx_parse, NULL, NULL,
+ agentx_realloc_build, agentx_check_packet, NULL);
if (main_session == NULL) {
if (!netsnmp_ds_get_boolean(NETSNMP_DS_APPLICATION_ID,
@@ -812,8 +816,9 @@
main_session = NULL;
return -1;
}
+ agentx_open_session(trap_session);
- if (add_trap_session(main_session, AGENTX_MSG_NOTIFY, 1,
+ if (add_trap_session(trap_session, AGENTX_MSG_NOTIFY, 1,
AGENTX_VERSION_1)) {
DEBUGMSGTL(("agentx/subagent", " trap session registered OK\n"));
} else {
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users