[dovecot-cvs] dovecot/src/pop3 client.c,1.42,1.43

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


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

Modified Files:
	client.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: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- client.c	13 Oct 2004 12:32:54 -0000	1.42
+++ client.c	20 Oct 2004 17:07:33 -0000	1.43
@@ -35,7 +35,7 @@
 static struct timeout *to_idle;
 
 static void client_input(void *context);
-static void client_output(void *context);
+static int client_output(void *context);
 
 static int sync_mailbox(struct mailbox *box)
 {
@@ -325,14 +325,14 @@
 		client_destroy(client);
 }
 
-static void client_output(void *context)
+static int client_output(void *context)
 {
 	struct client *client = context;
 	int ret;
 
 	if ((ret = o_stream_flush(client->output)) < 0) {
 		client_destroy(client);
-		return;
+		return 1;
 	}
 
 	client->last_output = ioloop_time;
@@ -352,6 +352,8 @@
 
 	if (client->cmd == NULL && client->io != NULL && client->waiting_input)
 		client_input(client);
+
+	return client->cmd == NULL;
 }
 
 static void idle_timeout(void *context __attr_unused__)



More information about the dovecot-cvs mailing list