[dovecot-cvs] dovecot/src/auth auth-master-connection.c,1.15,1.16

cras at dovecot.org cras at dovecot.org
Wed Oct 20 20:07:34 EEST 2004


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv4344/auth

Modified Files:
	auth-master-connection.c 
Log Message:
Changed ostream's flush callback to have return value which can tell if
there are more bytes to be sent even if there is none in output buffer
itself. Fixes FETCH commands which used o_stream_send_istream() getting
stuck.



Index: auth-master-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-master-connection.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- auth-master-connection.c	19 Oct 2004 00:51:21 -0000	1.15
+++ auth-master-connection.c	20 Oct 2004 17:07:32 -0000	1.16
@@ -34,7 +34,7 @@
 	struct auth_request *auth_request;
 };
 
-static void master_output(void *context);
+static int master_output(void *context);
 static void auth_master_connection_close(struct auth_master_connection *conn);
 static int auth_master_connection_unref(struct auth_master_connection *conn);
 
@@ -205,7 +205,7 @@
 	}
 }
 
-static void master_output(void *context)
+static int master_output(void *context)
 {
 	struct auth_master_connection *conn = context;
 	int ret;
@@ -213,13 +213,14 @@
 	if ((ret = o_stream_flush(conn->output)) < 0) {
 		/* transmit error, probably master died */
 		auth_master_connection_close(conn);
-		return;
+		return 1;
 	}
 
 	if (o_stream_get_buffer_used_size(conn->output) <= MAX_OUTBUF_SIZE/2) {
 		/* allow input again */
 		conn->io = io_add(conn->fd, IO_READ, master_input, conn);
 	}
+	return 1;
 }
 
 static void



More information about the dovecot-cvs mailing list