On 18/08/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > When I set a string value using SNMPSET, the following > problem occurs: > - if the string is longer than the previously set value, > SNMPSET works fine; > - if the string is shorter than the previously set value, > the rest of the "string buffer" retains the characters > from the previous SNMPSET operation.
Are you clearing the destination buffer before copying the new value? Or at the very least, are you null-terminating the new value? Note that string varbind values are held as "data+length", *not* "data+trailing 0". So if you just copy the value into an existing buffer, and don't append a trailing null character, then the new value will indeed run into the old one. Dave ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
