dovecot-2.0: ldap: Fixed random assert-crashing with with sasl_b...
dovecot at dovecot.org
dovecot at dovecot.org
Tue Jun 7 15:18:26 EEST 2011
details: http://hg.dovecot.org/dovecot-2.0/rev/c0734f08b3f3
changeset: 12844:c0734f08b3f3
user: Timo Sirainen <tss at iki.fi>
date: Tue Jun 07 15:18:19 2011 +0300
description:
ldap: Fixed random assert-crashing with with sasl_bind=yes.
diffstat:
src/auth/db-ldap.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (25 lines):
diff -r 6fdee880c5dc -r c0734f08b3f3 src/auth/db-ldap.c
--- a/src/auth/db-ldap.c Mon Jun 06 18:26:45 2011 +0300
+++ b/src/auth/db-ldap.c Tue Jun 07 15:18:19 2011 +0300
@@ -328,7 +328,10 @@
struct ldap_request *const *requestp, *request;
int ret = -1;
- i_assert(conn->pending_count <= aqueue_count(conn->request_queue));
+ /* connecting may call db_ldap_connect_finish(), which gets us back
+ here. so do the connection before checking the request queue. */
+ if (db_ldap_connect(conn) < 0)
+ return FALSE;
if (conn->pending_count == aqueue_count(conn->request_queue)) {
/* no non-pending requests */
@@ -339,9 +342,6 @@
return FALSE;
}
- if (db_ldap_connect(conn) < 0)
- return FALSE;
-
requestp = array_idx(&conn->request_array,
aqueue_idx(conn->request_queue,
conn->pending_count));
More information about the dovecot-cvs
mailing list