rpms/bind-dyndb-ldap/F-11 bind-dyndb-ldap-reconnection.patch, NONE, 1.1 bind-dyndb-ldap.spec, 1.3, 1.4

Martin Nagy mnagy at fedoraproject.org
Fri Sep 4 13:07:00 UTC 2009


Author: mnagy

Update of /cvs/extras/rpms/bind-dyndb-ldap/F-11
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv7211

Modified Files:
	bind-dyndb-ldap.spec 
Added Files:
	bind-dyndb-ldap-reconnection.patch 
Log Message:
* Fri Sep 04 2009 Martin Nagy <mnagy at redhat.com> - 0.1.0-0.4.a1
- fix reconnection to the LDAP server


bind-dyndb-ldap-reconnection.patch:
 ldap_helper.c |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

--- NEW FILE bind-dyndb-ldap-reconnection.patch ---
diff -up bind-dyndb-ldap-0.1.0a1/src/ldap_helper.c.reconnection bind-dyndb-ldap-0.1.0a1/src/ldap_helper.c
--- bind-dyndb-ldap-0.1.0a1/src/ldap_helper.c.reconnection	2009-09-04 14:45:52.088622308 +0200
+++ bind-dyndb-ldap-0.1.0a1/src/ldap_helper.c	2009-09-04 14:55:25.643684393 +0200
@@ -1521,10 +1521,11 @@ ldap_connect(ldap_instance_t *ldap_inst)
 	LDAP_OPT_CHECK(ret, "failed to set timeout: %s", ldap_err2string(ret));
 	*/
 
+	if (ldap_inst->handle != NULL)
+		ldap_unbind_ext_s(ldap_inst->handle, NULL, NULL);
 	ldap_inst->handle = ld;
-	ldap_reconnect(ldap_inst);
 
-	return ISC_R_SUCCESS;
+	return ldap_reconnect(ldap_inst);
 
 cleanup:
 
@@ -1636,11 +1637,10 @@ handle_connection_error(ldap_instance_t 
 		*result = ISC_R_SUCCESS;
 		ldap_inst->tries = 0;
 		return 0;
-	} else if (err_code == LDAP_SERVER_DOWN) {
+	} else if (err_code == LDAP_SERVER_DOWN || err_code == LDAP_CONNECT_ERROR) {
 		if (ldap_inst->tries == 0)
 			log_error("connection to the LDAP server was lost");
-		*result = ldap_reconnect(ldap_inst);
-		if (*result == ISC_R_SUCCESS)
+		if (ldap_connect(ldap_inst) == ISC_R_SUCCESS)
 			return 1;
 	} else {
 		err_string = ldap_err2string(err_code);


Index: bind-dyndb-ldap.spec
===================================================================
RCS file: /cvs/extras/rpms/bind-dyndb-ldap/F-11/bind-dyndb-ldap.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -p -r1.3 -r1.4
--- bind-dyndb-ldap.spec	31 Aug 2009 09:11:33 -0000	1.3
+++ bind-dyndb-ldap.spec	4 Sep 2009 13:07:00 -0000	1.4
@@ -1,6 +1,6 @@
 Name:           bind-dyndb-ldap
 Version:        0.1.0
-Release:        0.3.a1%{?dist}
+Release:        0.4.a1%{?dist}
 Summary:        LDAP back-end plug-in for BIND
 
 Group:          System Environment/Libraries
@@ -14,6 +14,7 @@ BuildRequires:  openldap-devel
 Requires:       bind >= 9.6.1-0.3.b1
 
 Patch0:         bind-dyndb-ldap-bool_case.patch
+Patch1:         bind-dyndb-ldap-reconnection.patch
 
 %description
 This package provides an LDAP back-end plug-in for BIND. It features
@@ -25,6 +26,7 @@ off of your LDAP server.
 %setup -q -n %{name}-%{version}a1
 
 %patch0 -p1 -b .bool_case
+%patch1 -p1 -b .reconnection
 
 
 %build
@@ -52,6 +54,9 @@ rm -rf %{buildroot}
 
 
 %changelog
+* Fri Sep 04 2009 Martin Nagy <mnagy at redhat.com> - 0.1.0-0.4.a1
+- fix reconnection to the LDAP server
+
 * Mon Aug 31 2009 Martin Nagy <mnagy at redhat.com> - 0.1.0-0.3.a1
 - Use uppercase boolean values (#520256)
 




More information about the fedora-extras-commits mailing list