[dovecot-cvs] dovecot/src/pop3-login client-authenticate.c, 1.49.2.5, 1.49.2.6

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


Update of /var/lib/cvs/dovecot/src/pop3-login
In directory talvi:/tmp/cvs-serv6485/pop3-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/pop3-login/client-authenticate.c,v
retrieving revision 1.49.2.5
retrieving revision 1.49.2.6
diff -u -d -r1.49.2.5 -r1.49.2.6
--- client-authenticate.c	20 Dec 2006 04:52:25 -0000	1.49.2.5
+++ client-authenticate.c	16 Feb 2007 13:42:00 -0000	1.49.2.6
@@ -140,11 +140,13 @@
 
 	client_send_line(client, str_c(reply));
 
-	/* 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;
 }
 
@@ -181,11 +183,13 @@
 				  data : AUTH_FAILED_MSG, NULL);
 		client_send_line(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