On Wed, 06 Oct 2004 15:58:10 +0100 Dave wrote:
DS>     netsnmp_handler_registration *reg =
DS>         netsnmp_create_handler_registration( ..., handle_myObject, ... );
DS>     netsnmp_watcher_info *watch =
DS>         netsnmp_create_watcher_info( buf, sizeof( buf ),
DS>                                      ASN_OCTET_STRING,
DS>                                      WATCHER_MAX_SIZE);
DS> +   watch->data_size = strlen( buf );
DS>     netsnmp_register_watched_scalar( reg, watch );

And make sure the buf is static, or allocated. Don't use a local variable on
the stack!

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

You are lost in a twisty maze of little standards, all different. 


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to