dovecot-2.2: replicator: Fixed assert-crash if dsync server disc...

dovecot at dovecot.org dovecot at dovecot.org
Tue Aug 6 12:48:28 EEST 2013


details:   http://hg.dovecot.org/dovecot-2.2/rev/820f4dbaebdd
changeset: 16662:820f4dbaebdd
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Aug 06 12:48:15 2013 +0300
description:
replicator: Fixed assert-crash if dsync server disconnected.

diffstat:

 src/replication/replicator/dsync-client.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (24 lines):

diff -r b846a046d978 -r 820f4dbaebdd src/replication/replicator/dsync-client.c
--- a/src/replication/replicator/dsync-client.c	Mon Aug 05 22:22:51 2013 +0300
+++ b/src/replication/replicator/dsync-client.c	Tue Aug 06 12:48:15 2013 +0300
@@ -68,6 +68,10 @@
 
 static void dsync_close(struct dsync_client *client)
 {
+	client->cmd_sent = FALSE;
+	client->handshaked = FALSE;
+	i_free_and_null(client->state);
+
 	if (client->fd == -1)
 		return;
 
@@ -77,9 +81,6 @@
 	if (close(client->fd) < 0)
 		i_error("close(dsync) failed: %m");
 	client->fd = -1;
-	i_free_and_null(client->state);
-	client->cmd_sent = FALSE;
-	client->handshaked = FALSE;
 }
 
 static void dsync_disconnect(struct dsync_client *client)


More information about the dovecot-cvs mailing list