From c3fc65eb7c3946c737ba9c323ca29d5fd6164449 Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Tue, 8 Sep 2015 15:24:09 -0700 Subject: Fix bug in LDAP extensions' saving TIMELIMIT and DEREF LDAP_OPT_TIMELIMIT and LDAP_OPT_DEREF's original values weren't saved properly because of a bug introduced when copy and pasting. This lead to the original timeout being changed when specifying a temporary override (e.g. for ldap_search(..., $timeout)) --- ext/ldap/ldap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext/ldap/ldap.c') diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index 4db15e5bb9..b3b888405a 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -600,7 +600,7 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref, in /* timelimit */ if (timelimit > -1) { #if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP - ldap_get_option(ldap, LDAP_OPT_SIZELIMIT, old_timelimit); + ldap_get_option(ldap, LDAP_OPT_TIMELIMIT, old_timelimit); ldap_set_option(ldap, LDAP_OPT_TIMELIMIT, &timelimit); #else *old_timelimit = ldap->ld_timelimit; @@ -611,7 +611,7 @@ static void php_set_opts(LDAP *ldap, int sizelimit, int timelimit, int deref, in /* deref */ if (deref > -1) { #if (LDAP_API_VERSION >= 2004) || HAVE_NSLDAP || HAVE_ORALDAP - ldap_get_option(ldap, LDAP_OPT_SIZELIMIT, old_deref); + ldap_get_option(ldap, LDAP_OPT_DEREF, old_deref); ldap_set_option(ldap, LDAP_OPT_DEREF, &deref); #else *old_deref = ldap->ld_deref; -- cgit v1.2.1