> On 23/01/2008, Xuan Pan 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.


This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
Net-snmp-users mailing list
Please see the following page to unsubscribe or change other options: