Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArthur de Jong <arthur@arthurdejong.org>2008-02-02 13:02:09 +0100
committerArthur de Jong <arthur@arthurdejong.org>2008-02-02 13:02:09 +0100
commite199821b974e6071c8fbbc4d2664dd5cd35893a9 (patch)
treeec956cf067b1671b5ec1a9ce020602077056895f
parent901e760512a501bef841a9d20011cffec21f37b4 (diff)
log and otherwise ignore errors in ldap_parse_page_control()
git-svn-id: http://arthurdejong.org/svn/nss-pam-ldapd/nss-ldapd@608 ef36b2f9-881f-0410-afb5-c4e39611909c
-rw-r--r--nslcd/myldap.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/nslcd/myldap.c b/nslcd/myldap.c
index 8585237..5de9f4c 100644
--- a/nslcd/myldap.c
+++ b/nslcd/myldap.c
@@ -959,9 +959,16 @@ MYLDAP_ENTRY *myldap_get_entry(MYLDAP_SEARCH *search,int *rcp)
if (resultcontrols!=NULL)
{
/* see if there are any more pages to come */
- ldap_parse_page_control(search->session->ld,
- resultcontrols,NULL,
- &(search->cookie));
+ rc=ldap_parse_page_control(search->session->ld,
+ resultcontrols,NULL,
+ &(search->cookie));
+ if (rc!=LDAP_SUCCESS)
+ {
+ log_log(LOG_WARNING,"ldap_parse_page_control() failed: %s",
+ ldap_err2string(rc));
+ rc=LDAP_SUCCESS;
+ ldap_set_option(search->session->ld,LDAP_OPT_ERROR_NUMBER,&rc);
+ }
/* TODO: handle the above return code?? */
ldap_controls_free(resultcontrols);
}