Re: Index out of range when using get_node
On 10/03/2008, Jelena Savic <JSavic@evertz.com> wrote:[color=blue]
> Then i have an application that takes in a list of oids, and parses them using read_objid
> (however the same problem occurs while using snmp_parse_oid or get_node)
>
> I get the problem:
> Unknown object identifier: Index out of range
>
> if in my list of oids that need to be parsed, there is an oid with smaller
> number of subids before an oid with more subids.[/color]
Do you reset the length parameter before calling 'read_objid'?
This should hold the maximum length of the OID buffer.
When read_objid returns, this parameter holds the *actual*
length of the OID that was read. If you are going to re-use the same
variables, then you need to reset this to be the maximum length before
processing the next OID.
Dave
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
[url]http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/[/url]
_______________________________________________
Net-snmp-users mailing list
[email]Net-snmp-users@lists.sourceforge.net[/email]
Please see the following page to unsubscribe or change other options:
[url]https://lists.sourceforge.net/lists/listinfo/net-snmp-users[/url]