[dovecot-cvs] dovecot/src/auth db-ldap.c,1.58,1.59

tss at dovecot.org tss at dovecot.org
Tue Jan 9 11:40:10 UTC 2007


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv3792

Modified Files:
	db-ldap.c 
Log Message:
If ldap_bind() fails directly, log the "ldap server down" errors more nicely.


Index: db-ldap.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/db-ldap.c,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- db-ldap.c	15 Dec 2006 18:38:08 -0000	1.58
+++ db-ldap.c	9 Jan 2007 11:40:07 -0000	1.59
@@ -407,11 +407,10 @@
 	ldap_request->callback = db_ldap_bind_callback;
 	ldap_request->context = conn;
 
-	msgid = ldap_bind(conn->ld, conn->set.dn, conn->set.
-			  dnpass, LDAP_AUTH_SIMPLE);
+	msgid = ldap_bind(conn->ld, conn->set.dn, conn->set.dnpass,
+			  LDAP_AUTH_SIMPLE);
 	if (msgid == -1) {
-		i_error("ldap_bind(%s) failed: %s",
-			conn->set.dn, ldap_get_error(conn));
+		db_ldap_connect_finish(conn, ldap_get_error(conn));
 		i_free(ldap_request);
 		return -1;
 	}



More information about the dovecot-cvs mailing list