[dovecot-cvs] dovecot/src/imap-login imap-proxy.c,1.7.2.7,1.7.2.8

tss at dovecot.org tss at dovecot.org
Thu Feb 15 13:31:21 UTC 2007


Update of /var/lib/cvs/dovecot/src/imap-login
In directory talvi:/tmp/cvs-serv24814/imap-login

Modified Files:
      Tag: branch_1_0
	imap-proxy.c 
Log Message:
Don't crash if the remote server disconnects before we're logged in.



Index: imap-proxy.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap-login/imap-proxy.c,v
retrieving revision 1.7.2.7
retrieving revision 1.7.2.8
diff -u -d -r1.7.2.7 -r1.7.2.8
--- imap-proxy.c	19 Jan 2007 21:19:47 -0000	1.7.2.7
+++ imap-proxy.c	15 Feb 2007 13:31:18 -0000	1.7.2.8
@@ -100,12 +100,19 @@
 			return;
 		}
 
+		if (client->destroyed) {
+			/* we came here from client_destroy() */
+			return;
+		}
+
 		/* failed for some reason, probably server disconnected */
 		client_send_line(client, "* BYE Temporary login failure.");
 		client_destroy(client, NULL);
 		return;
 	}
 
+	i_assert(!client->destroyed);
+
 	switch (i_stream_read(input)) {
 	case -2:
 		/* buffer full */



More information about the dovecot-cvs mailing list