[dovecot-cvs] dovecot/src/imap client.c,1.55,1.56
cras at dovecot.org
cras at dovecot.org
Mon Jul 4 00:35:20 EEST 2005
Update of /var/lib/cvs/dovecot/src/imap
In directory talvi:/tmp/cvs-serv10106/imap
Modified Files:
client.c
Log Message:
Call t_push/t_pop around client command execution function, so if client
sends multiple commands at once we don't waste memory.
Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap/client.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- client.c 29 May 2005 10:50:43 -0000 1.55
+++ client.c 3 Jul 2005 21:35:18 -0000 1.56
@@ -352,6 +352,7 @@
{
struct client *client = context;
struct client_command_context *cmd = &client->cmd;
+ int ret;
if (client->command_pending) {
/* already processing one command. wait. */
@@ -380,8 +381,11 @@
}
o_stream_cork(client->output);
- while (client_handle_input(cmd))
- ;
+ do {
+ t_push();
+ ret = client_handle_input(cmd);
+ t_pop();
+ } while (ret);
o_stream_uncork(client->output);
if (client->command_pending)
More information about the dovecot-cvs
mailing list