>>>>> "a" == ayan <[EMAIL PROTECTED]> writes:
a> - if the string is shorter than the previously set value, a> the rest of the "string buffer" retains the characters a> from the previous SNMPSET operation. It sounds like the code you're using copies the string into the old buffer but doesn't append a '\0' character to it... a> case MODE_SET_ACTION: a> snmp_log(LOG_ERR, "pmibLbandPolar: string_value: a> %s\n", requests->requestvb->val.string); a> polar_string = requests->requestvb->val.string; You can't do that... You *MUST* copy the value from that structure to your own location instead. Unless that's what dboper_proc_usr_input is doing. char mybuf[SPRINT_MAX_LEN]; strncpy(mybuf, requests->requestvb->val.string, requests->requestvb->val_len); mybuf[SNMP_MIN(requests->requestvb->val_len, SPRINT_MAX_LEN-1)] = '\0'; -- Wes Hardaker Sparta, Inc. ------------------------------------------------------------------------- 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
