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

Re: ldap_perror give "Success" message!!

Shock <shock@saudi.net.sa> writes:

> This is the part that gave me the error:
> ---------------------------------------------
>   e=ldap_first_entry(ld, result);
>   if (e == NULL) {
>      ldap_perror(ld,"ldap_first_entry");
>      return -1;
>   }
> ---------------------------------------------

It is not an error that no entry is returned.

You should not expect an error under those circumstances.

This situation happens when you search something and no
entry matches the filter or you are not permitted to see
those that do.

You get a succesful result, but the set of entries returned
is empty.

An error there would mean that the search request could not
be carried out, that's a completely different thing.