changeset 18364:3546457ae3fb

auth ldap: Crashfixes for earlier changes. Hopefully works correctly now
author Timo Sirainen <tss@iki.fi>
date Tue, 17 Mar 2015 17:30:33 +0200
parents a4acf88b0c91
children 128115b3807c
files src/auth/db-ldap.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/auth/db-ldap.c	Tue Mar 17 10:49:20 2015 +0200
+++ b/src/auth/db-ldap.c	Tue Mar 17 17:30:33 2015 +0200
@@ -1222,7 +1222,7 @@
 
 static void db_ldap_connect_callback(struct ldap_connection *conn)
 {
-	timeout_remove(&conn->to);
+	i_assert(conn->conn_state == LDAP_CONN_STATE_DISCONNECTED);
 	(void)db_ldap_connect(conn);
 }
 
@@ -1267,6 +1267,7 @@
 	unsigned int i;
 
 	conn->conn_state = LDAP_CONN_STATE_DISCONNECTED;
+	conn->delayed_connect = FALSE;
 	conn->default_bind_msgid = -1;
 
 	if (conn->to != NULL)