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