Re: Limitations on filters?

Hallvard B Furuseth (h.b.furuseth@usit.uio.no)
Tue, 13 Feb 1996 13:32:09 +0100

On Tue, 13 Feb 1996, Roland Hedberg wrote:
>On Tue, 13 Feb 1996, Hallvard B Furuseth wrote:
>
>> Does the part you added, work by itself? I.e. this filter:
>>
>> (&(objectClass=*)(|(sn~=Bre)(l~=Bre)(c~=Bre)))
>
> It shouldn't since 'Bre' is an invalid country code !!

Duh. Now that's called "not reading your own reply".

So, the correct response to your original request is:
CHECK THE ERROR CODE FROM THE LDAP CALLS!

Something like this:

rc = ldap_search_st( ld, ... );
if ( rc != LDAP_SUCCESS ) {
if (rc == LDAP_SIZELIMIT_EXCEEDED || rc == LDAP_PARTIAL_RESULTS ||
rc == LDAP_TIMELIMIT_EXCEEDED) {
give warning, then continue;
} else {
ldap_perror( ld, "...");
return;
}
}

Incidentally, what's the correct way to distinguish between "good" and
"bad" error codes --- i.e. whether or not to try to use the data
returned from the ldap call?

Regards,

Hallvard