[dovecot-cvs] dovecot/src/pop3 client.c, 1.55, 1.56 commands.c, 1.44, 1.45

cras at dovecot.org cras at dovecot.org
Tue Jun 28 12:54:11 EEST 2005


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

Modified Files:
	client.c commands.c 
Log Message:
Don't treat known commands with (somewhat) invalid parameters as "bad
commands" causing disconnection. Only unknown commands.



Index: client.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/client.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- client.c	28 May 2005 11:20:49 -0000	1.55
+++ client.c	28 Jun 2005 09:54:02 -0000	1.56
@@ -351,7 +351,7 @@
 		else
 			*args++ = '\0';
 
-		if (client_command_execute(client, line, args)) {
+		if (client_command_execute(client, line, args) >= 0) {
 			client->bad_counter = 0;
 			if (client->cmd != NULL) {
 				o_stream_set_flush_pending(client->output,

Index: commands.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3/commands.c,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- commands.c	23 May 2005 19:46:27 -0000	1.44
+++ commands.c	28 Jun 2005 09:54:02 -0000	1.45
@@ -637,7 +637,7 @@
 }
 
 int client_command_execute(struct client *client,
-			    const char *name, const char *args)
+			   const char *name, const char *args)
 {
 	/* keep the command uppercased */
 	name = t_str_ucase(name);
@@ -688,5 +688,5 @@
 	}
 
 	client_send_line(client, "-ERR Unknown command: %s", name);
-	return FALSE;
+	return -1;
 }



More information about the dovecot-cvs mailing list