dovecot-2.2: replicator: Don't try to reuse doveadm connections ...
    dovecot at dovecot.org 
    dovecot at dovecot.org
       
    Thu Jan 31 22:14:30 EET 2013
    
    
  
details:   http://hg.dovecot.org/dovecot-2.2/rev/e9e6a95cea21
changeset: 15706:e9e6a95cea21
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Jan 31 22:14:12 2013 +0200
description:
replicator: Don't try to reuse doveadm connections (and have them immediately fail)
diffstat:
 src/replication/replicator/doveadm-connection.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
diffs (17 lines):
diff -r 0a5a19067d95 -r e9e6a95cea21 src/replication/replicator/doveadm-connection.c
--- a/src/replication/replicator/doveadm-connection.c	Thu Jan 31 22:13:36 2013 +0200
+++ b/src/replication/replicator/doveadm-connection.c	Thu Jan 31 22:14:12 2013 +0200
@@ -57,7 +57,13 @@
 
 	conn->callback = NULL;
 	conn->context = NULL;
+
+	/* make sure callback doesn't try to reuse this connection, since
+	   we can't currently handle it */
+	i_assert(!conn->cmd_sent);
+	conn->cmd_sent = TRUE;
 	callback(reply, state, context);
+	conn->cmd_sent = FALSE;
 }
 
 static void doveadm_close(struct doveadm_connection *conn)
    
    
More information about the dovecot-cvs
mailing list