[dovecot-cvs] dovecot/src/pop3 client.c,1.49,1.50

cras at dovecot.org cras at dovecot.org
Tue Apr 26 13:44:00 EEST 2005


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

Modified Files:
	client.c 
Log Message:
o_stream_uncork() was previously always setting IO_WRITE handler even if
there was no reason for it. This was relied on in imap/pop3 code when a
handler could just send as much data as it can without actually buffering
anything.

So, removed the IO_WRITE handler forcing. It's only set if there's actually
data in buffer or if flush_pending is set (via o_stream_set_flush_pending()
or by returning 0 from flush callback handler).

All in all, a minor optimization.



Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- client.c	3 Apr 2005 11:36:21 -0000	1.49
+++ client.c	26 Apr 2005 10:43:57 -0000	1.50
@@ -310,6 +310,8 @@
 		if (client_command_execute(client, line, args)) {
 			client->bad_counter = 0;
 			if (client->cmd != NULL) {
+				o_stream_set_flush_pending(client->output,
+							   TRUE);
 				client->waiting_input = TRUE;
 				break;
 			}



More information about the dovecot-cvs mailing list