> On 23/01/2008, Xuan Pan <[EMAIL PROTECTED]> wrote:
>> Finally I am stuck in front of an error, Internal error in type
>> switching.
>> It occurs:
>>
>> snmp_set_var_value(pIndex, (u_char *)& lpDhcpEntry->index, sizeof(int));
>> pIndex = pIndex->next_variable;
>> // Before this!!!!!
>> snmp_set_var_value(pIndex, (u_char *)& lpIpRangeEntry->index,
>> sizeof(int));
>
>
> Where *exactly* does this error occur?
> Try running the agent under a debugger.
>
>     $ gdb snmpd
>     gdb> b getNextIpRangeContext     {or wherever it is choking}
>     gdb> run -f -Le    {plus any other options you might need}
>
>
> Then run a single "snmpgetnext -r 0 -t 6000 ..." query against this agent,
> and single step through the routine until you hit this error.
>    What does the structure pointed to by 'pIndex' look like at that point?

Well it is a segmentation fault caused by a 'NULL' pIndex pointer (print
pIndex returns 0x1). Sadly, it looks wrong.

/Pan




-------------------------------------------------------------------------
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

Reply via email to