Infinitly looping call to get_first_data_point function
Steve Stetka <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
When I use snmpget or snmpgetnext to access data in my table, I get a timeout. I put some printfs in my code and noticed that my get_first_data_point function (getFirst in my case) is infinitly being called. I am assuming I am not setting something correctly in the function. All I do is set idx (put_index_data) to the first index of my data array (0). Do I HAVE to set loop_context and data_context? My data is external to the subagent; and all I need is the index for snmpset and snmpget handling. Should I set the loop_context to the address of my static iterIdx variable below?
netsnmp_variable_list* PresetDataTableHandler::getFirst(
void **my_loop_context,
void **my_data_context,
netsnmp_variable_list *put_index_data,
netsnmp_iterator_info *mydata) {
printf("%s:%d %s\n", __FUNCTION__, __LINE__, "Entered.");
netsnmp_variable_list *idx = put_index_data;
PresetDataTableHandler::iterIdx = 0;
snmp_set_var_typed_integer(
idx,
ASN_INTEGER,
PresetDataTableHandler::iterIdx );
idx = idx->next_variable;
printf("%s:%d %s\n", __FUNCTION__, __LINE__, "Exit.");
return put_index_data;
}
Thanks,
Steve
_________________________________________________________________
Hotmail: Trusted email with powerful SPAM protection.
http://clk.atdmt.com/GBL/go/177141665/direct/01/
------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
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