From e199821b974e6071c8fbbc4d2664dd5cd35893a9 Mon Sep 17 00:00:00 2001 From: Arthur de Jong Date: Sat, 2 Feb 2008 12:02:09 +0000 Subject: 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 --- nslcd/myldap.c | 13 ++++++++++--- 1 file 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); } -- cgit v1.2.3