On Wed, 15 Sep 2004 13:09:54 -0400 [EMAIL PROTECTED] wrote: CRC> I'm trying to use read_config_read_octet_string() (in 5.1.1) and I'm not CRC> getting the results I expect.
<ghost voice>Use the source, Luke...</ghost voice> CRC> But, if I do: CRC> ... CRC> char* pt; CRC> size_t len; CRC> char value[32]; CRC> ... CRC> read_config_read_octet_string(pt, CRC> (u_char**)&value, CRC> &len); CRC> CRC> len has the same value but only one character is copied into value. Am I CRC> missing something obvious and stupid? No, the function is inconsistent in its use of the len parameter. In the case of a non-hex string and a user provided buffer, it passes len to a function that expects it to be a buffer size.Thus, adding one line before the read will fix your problem: len = sizeof(value); -- Robert Story; NET-SNMP Junkie <http://www.net-snmp.org/> <irc://irc.freenode.net/#net-snmp> Archive: <http://sourceforge.net/mailarchive/forum.php?forum=net-snmp-users> You are lost in a twisty maze of little standards, all different. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php _______________________________________________ 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