changeset 8775:98e1115cd8f0 HEAD

pop3-login: Don't crash after successful login.
author Timo Sirainen <tss@iki.fi>
date Tue, 24 Feb 2009 16:41:08 -0500
parents e9f711a08dd5
children 3bd20d70b0d6
files src/pop3-login/pop3-proxy.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/pop3-login/pop3-proxy.c	Tue Feb 24 16:41:00 2009 -0500
+++ b/src/pop3-login/pop3-proxy.c	Tue Feb 24 16:41:08 2009 -0500
@@ -134,7 +134,7 @@
 		client->output = NULL;
 		client->common.fd = -1;
 		client_destroy_success(client, str_c(str));
-		return 0;
+		return 1;
 	}
 
 	/* Login failed. Pass through the error message to client
@@ -208,7 +208,7 @@
 	}
 
 	while ((line = i_stream_next_line(input)) != NULL) {
-		if (proxy_input_line(client, output, line) < 0)
+		if (proxy_input_line(client, output, line) != 0)
 			break;
 	}
 }