Re: [convert string as oid]
Dave Shield <[email protected]>
| Newsgroups | gmane.network.net-snmp.user |
|---|---|
| Message-ID | <[email protected]> |
On 16 February 2010 14:36, Ashish vashishtha <[email protected]> wrote: > for( int k = 0; k< vdata.size();k++) > { > char arr[MAX_OID_LEN]; > oid kpioid[MAX_OID_LEN]; > size_t oidlength = MAX_OID_LEN; > strcpy(arr,vdata[k].c_str()); Try clearing the 'arr' string before you copy vdata[k] to it. > snmp_parse_oid(arr,kpioid,&oidlength)) Alternatively, why not simply call snmp_parse_oid( vdata[k], kpioid, &oidlength ); directly? What's the point of using the 'arr' temporary buffer? Dave ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ 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