[dovecot-cvs] dovecot/src/imap-login client.c,1.35,1.36

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


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

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/imap-login/client.c,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- client.c	20 Oct 2004 14:02:12 -0000	1.35
+++ client.c	20 Oct 2004 17:07:32 -0000	1.36
@@ -138,18 +138,19 @@
 	client->io = io_add(client->common.fd, IO_READ, client_input, client);
 }
 
-static void client_output_starttls(void *context)
+static int client_output_starttls(void *context)
 {
 	struct imap_client *client = context;
 	int ret;
 
 	if ((ret = o_stream_flush(client->output)) < 0) {
 		client_destroy(client, "Disconnected");
-		return;
+		return 1;
 	}
 
 	if (ret > 0)
 		client_start_tls(client);
+	return 1;
 }
 
 static int cmd_starttls(struct imap_client *client)



More information about the dovecot-cvs mailing list