Re: [convert string as oid]

Ashish vashishtha <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
That also i have tried but result was the same.



On Tue, Feb 16, 2010 at 8:18 PM, Dave Shield <[email protected]>wrote:

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



-- 
Regards
Ashish Vashishtha

------------------------------------------------------------------------------
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.