dovecot-2.1: anvil: Assert-crashfix at exit when there were fifo...

dovecot at dovecot.org dovecot at dovecot.org
Sun Sep 4 11:30:18 EEST 2011


details:   http://hg.dovecot.org/dovecot-2.1/rev/66453d942761
changeset: 13372:66453d942761
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Sep 04 10:15:16 2011 +0300
description:
anvil: Assert-crashfix at exit when there were fifo connections.

diffstat:

 src/anvil/anvil-connection.c |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (37 lines):

diff -r ddcf7d2f109a -r 66453d942761 src/anvil/anvil-connection.c
--- a/src/anvil/anvil-connection.c	Sun Sep 04 10:12:30 2011 +0300
+++ b/src/anvil/anvil-connection.c	Sun Sep 04 10:15:16 2011 +0300
@@ -29,6 +29,7 @@
 	unsigned int version_received:1;
 	unsigned int handshaked:1;
 	unsigned int master:1;
+	unsigned int fifo:1;
 };
 
 struct anvil_connection *anvil_connections = NULL;
@@ -180,12 +181,15 @@
 		conn->output = o_stream_create_fd(fd, (size_t)-1, FALSE);
 	conn->io = io_add(fd, IO_READ, anvil_connection_input, conn);
 	conn->master = master;
+	conn->fifo = fifo;
 	DLLIST_PREPEND(&anvil_connections, conn);
 	return conn;
 }
 
 void anvil_connection_destroy(struct anvil_connection *conn)
 {
+	bool fifo = conn->fifo;
+
 	DLLIST_REMOVE(&anvil_connections, conn);
 
 	io_remove(&conn->io);
@@ -196,7 +200,8 @@
 		i_error("close(anvil conn) failed: %m");
 	i_free(conn);
 
-	master_service_client_connection_destroyed(master_service);
+	if (!fifo)
+		master_service_client_connection_destroyed(master_service);
 }
 
 void anvil_connections_destroy_all(void)


More information about the dovecot-cvs mailing list