changeset 3441:7888394f2985 HEAD

Don't treat known commands with (somewhat) invalid parameters as "bad commands" causing disconnection. Only unknown commands.
author Timo Sirainen <tss@iki.fi>
date Tue, 28 Jun 2005 12:54:02 +0300
parents 2280ed0a9812
children 877fa3d04313
files src/pop3/client.c src/pop3/commands.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/pop3/client.c	Tue Jun 28 03:07:56 2005 +0300
+++ b/src/pop3/client.c	Tue Jun 28 12:54:02 2005 +0300
@@ -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,
--- a/src/pop3/commands.c	Tue Jun 28 03:07:56 2005 +0300
+++ b/src/pop3/commands.c	Tue Jun 28 12:54:02 2005 +0300
@@ -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;
 }