Re: registering pdu failed: 263!
"Dave Shield" <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 18/01/2008, NetSnmp User <[email protected]> wrote: > Well I found why the registestration was happening twice. > It was because netsnmp_register_scalar function was calling > netsnmp_register_handler internally. Of course - I hadn't spotted that you'd got two registration calls for the same registration structure. > So I removed netsnmp_register_scalar call which worked fine for me. Wrong call. Your handler routines are written to use the 'instance' helper (which is part of the 'scalar' handler chain). So you *do* want to use netsnmp_register_scalar. The netsnmp_register_handler() call is only used when you want control over the *whole* of an OID subtree, and will be doing all of the OID checking yourself. That's not true here. Try something like: reg = netsnmp_create_handler_registration(....); reg->contextName = strdup("MyContext"); netsnmp_register_scalar(reg); Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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