On Wed, 1 Feb 2006 20:25:35 +0100 Marcus wrote:
MR> the function definition of of netsnmp_tdata_row_get_byoid got me on the
MR> right track:
MR> [[[
MR> /** finds a row in the 'tdata' table given the index OID */
MR> netsnmp_tdata_row *
MR> netsnmp_tdata_row_get_byoid(netsnmp_tdata *table,
MR> oid * searchfor, size_t searchfor_len)
MR>
MR> ]]]
MR>
MR> but the passed elements of the row struct where defined as:
MR> [[[
MR> typedef struct netsnmp_index_s {
MR> int len;
MR> oid *oids;
MR> } netsnmp_index;
MR> ]]]
MR>
MR> changing the length to size_t fixed the crashes.:)
That makes no sense to me. The compiler ought to know the sizes of things and
convert. There's no blind casting to confuse things...
I hate the idea of making OID lengths size_t... The max value is 128, for
pete's sake! Any unsigned char is big enough!
--
NOTE: messages sent directly to me, instead of the lists, will be deleted
unless they are requests for paid consulting services.
Robert Story; NET-SNMP Junkie
Support: <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp>
Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-coders>
You are lost in a twisty maze of little standards, all different.
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders