[dovecot-cvs] dovecot/src/pop3 client.c,1.56,1.57

cras at dovecot.org cras at dovecot.org
Mon Jul 4 00:35:20 EEST 2005


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

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/pop3/client.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -d -r1.56 -r1.57
--- client.c	28 Jun 2005 09:54:02 -0000	1.56
+++ client.c	3 Jul 2005 21:35:18 -0000	1.57
@@ -317,6 +317,7 @@
 {
 	struct client *client = context;
 	char *line, *args;
+	int ret;
 
 	if (client->cmd != NULL) {
 		/* we're still processing a command. wait until it's
@@ -351,7 +352,10 @@
 		else
 			*args++ = '\0';
 
-		if (client_command_execute(client, line, args) >= 0) {
+		t_push();
+		ret = client_command_execute(client, line, args);
+		t_pop();
+		if (ret >= 0) {
 			client->bad_counter = 0;
 			if (client->cmd != NULL) {
 				o_stream_set_flush_pending(client->output,



More information about the dovecot-cvs mailing list