[dovecot-cvs] dovecot/src/imap-login client-authenticate.c, 1.39.2.6, 1.39.2.7

tss at dovecot.org tss at dovecot.org
Fri Feb 16 13:42:02 UTC 2007


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

Modified Files:
      Tag: branch_1_0
	client-authenticate.c 
Log Message:
If authentication fails and we've already destroyed the client, don't go
io_add()ing the client anywhere.



Index: client-authenticate.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/imap-login/client-authenticate.c,v
retrieving revision 1.39.2.6
retrieving revision 1.39.2.7
diff -u -d -r1.39.2.6 -r1.39.2.7
--- client-authenticate.c	20 Dec 2006 04:52:25 -0000	1.39.2.6
+++ client-authenticate.c	16 Feb 2007 13:41:59 -0000	1.39.2.7
@@ -167,10 +167,13 @@
 
 	i_assert(nologin);
 
-	/* get back to normal client input. */
-	if (client->io != NULL)
-		io_remove(&client->io);
-	client->io = io_add(client->common.fd, IO_READ, client_input, client);
+	if (!client->destroyed) {
+		/* get back to normal client input. */
+		if (client->io != NULL)
+			io_remove(&client->io);
+		client->io = io_add(client->common.fd, IO_READ,
+				    client_input, client);
+	}
 	return TRUE;
 }
 
@@ -208,11 +211,13 @@
 				  NULL);
 		client_send_tagline(client, msg);
 
-		/* get back to normal client input. */
-		if (client->io != NULL)
-			io_remove(&client->io);
-		client->io = io_add(client->common.fd, IO_READ,
-				    client_input, client);
+		if (!client->destroyed) {
+			/* get back to normal client input. */
+			if (client->io != NULL)
+				io_remove(&client->io);
+			client->io = io_add(client->common.fd, IO_READ,
+					    client_input, client);
+		}
 		break;
 	case SASL_SERVER_REPLY_MASTER_FAILED:
 		client_destroy_internal_failure(client);



More information about the dovecot-cvs mailing list