[dovecot-cvs] dovecot/src/pop3-login pop3-proxy.c, 1.10.2.6, 1.10.2.7
tss at dovecot.org
tss at dovecot.org
Thu Feb 15 13:31:25 UTC 2007
Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv24814/pop3-login
Modified Files:
Tag: branch_1_0
pop3-proxy.c
Log Message:
Don't crash if the remote server disconnects before we're logged in.
Index: pop3-proxy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/pop3-login/pop3-proxy.c,v
retrieving revision 1.10.2.6
retrieving revision 1.10.2.7
diff -u -d -r1.10.2.6 -r1.10.2.7
--- pop3-proxy.c 19 Jan 2007 21:19:48 -0000 1.10.2.6
+++ pop3-proxy.c 15 Feb 2007 13:31:23 -0000 1.10.2.7
@@ -17,8 +17,6 @@
string_t *str;
const char *line, *msg;
- i_assert(!client->destroyed);
-
if (input == NULL) {
if (client->io != NULL) {
/* remote authentication failed, we're just
@@ -26,6 +24,11 @@
return;
}
+ if (client->destroyed) {
+ /* we came here from client_destroy() */
+ return;
+ }
+
/* failed for some reason, probably server disconnected */
client_send_line(client,
"-ERR [IN-USE] Temporary login failure.");
@@ -33,6 +36,8 @@
return;
}
+ i_assert(!client->destroyed);
+
switch (i_stream_read(input)) {
case -2:
/* buffer full */
More information about the dovecot-cvs
mailing list