[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
Re: ldap_get_values returning NULL
You have set the value of `attrsonly' to one, meaning that you don't want
*values*. Set it to 0.
if (ldap_search_s(ld, search_base, LDAP_SCOPE_SUBTREE, \
filter, attrs, 0, &result) != LDAP_SUCCESS) {
^^^^
Regards,
-JP
On Thu, 27 Sep 2001, Marc Tardif wrote:
> I'm running OpenLDAP 2.0.10 and trying to get the value from an attribute
> using the ldap_get_values C function. I have condenced the relevant part
...
> /* Perform the search... */
> if (ldap_search_s(ld, search_base, LDAP_SCOPE_SUBTREE, \
> filter, attrs, 1, &result) != LDAP_SUCCESS) {
> printf("LDAP search failed: %s", filter);
> goto end_2;
> }
...