[dovecot-cvs] dovecot/src/pop3-login client.c,1.34,1.35

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


Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv4344/pop3-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/pop3-login/client.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- client.c	19 Oct 2004 15:47:45 -0000	1.34
+++ client.c	20 Oct 2004 17:07:33 -0000	1.35
@@ -92,18 +92,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 pop3_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_stls(struct pop3_client *client)



More information about the dovecot-cvs mailing list