[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: ldap_rdn2str

At 05:40 AM 12/4/2002, De Leeuw Guy wrote:
>Hello all,
>I try to use the function ldap_rdn2str :
>    LDAPDN*  testDN;
>    ldap_str2dn( dnutf8, &testDN, LDAP_DN_FORMAT_LDAP);
>    ldap_rdn2str( testDN[0][0], &explode,LDAP_DN_FORMAT_LDAPV3 |
>explode = "cn=theCN" how can obtain only the value "theCN" ?

Since you want to decode the value from the string, I'm
not sure why would call rdn2str().  Since you've already
decoded the string into its components using str2dn,
accessing the desired value is just a matter of accessing
the appropriate field of the LDAPDN structure.  Use of
a good debugger might aide in understanding the (perceived)
complexity of the LDAPDN structure.