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

cras at dovecot.org cras at dovecot.org
Sun Aug 22 15:02:50 EEST 2004


Update of /home/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv6289/imap

Modified Files:
	client.c 
Log Message:
fix



Index: client.c
===================================================================
RCS file: /home/cvs/dovecot/src/imap/client.c,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -d -r1.42 -r1.43
--- client.c	22 Aug 2004 11:48:55 -0000	1.42
+++ client.c	22 Aug 2004 12:02:48 -0000	1.43
@@ -364,7 +364,7 @@
 static void client_output(void *context)
 {
 	struct client *client = context;
-	int ret;
+	int ret, finished;
 
 	if ((ret = o_stream_flush(client->output)) < 0) {
 		client_destroy(client);
@@ -375,15 +375,17 @@
 
 	if (client->command_pending) {
 		o_stream_cork(client->output);
-		if (client->cmd_func(client)) {
+		finished = client->cmd_func(client);
+		o_stream_uncork(client->output);
+
+		if (finished) {
 			/* command execution was finished */
                         client->bad_counter = 0;
 			_client_reset_command(client);
-		}
-		o_stream_uncork(client->output);
 
-		if (client->input_pending)
-			_client_input(client);
+			if (client->input_pending)
+				_client_input(client);
+		}
 	}
 }
 



More information about the dovecot-cvs mailing list