[dovecot-cvs] dovecot/src/auth auth-master-connection.c, 1.40, 1.41 auth-master-listener.c, 1.5, 1.6 auth-worker-server.c, 1.7, 1.8 passdb-checkpassword.c, 1.15, 1.16

cras at dovecot.org cras at dovecot.org
Sun Jan 29 14:14:42 EET 2006


Update of /var/lib/cvs/dovecot/src/auth
In directory talvi:/tmp/cvs-serv19474/auth

Modified Files:
	auth-master-connection.c auth-master-listener.c 
	auth-worker-server.c passdb-checkpassword.c 
Log Message:
Call io_remove() before closing the fd. It's required by kqueue.



Index: auth-master-connection.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-master-connection.c,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- auth-master-connection.c	14 Jan 2006 18:47:20 -0000	1.40
+++ auth-master-connection.c	29 Jan 2006 12:14:40 -0000	1.41
@@ -271,16 +271,16 @@
 		return;
 	conn->destroyed = TRUE;
 
-	if (conn->fd != -1) {
-		if (close(conn->fd) < 0)
-			i_error("close(): %m");
-	}
 	if (conn->input != NULL)
 		i_stream_unref(&conn->input);
 	if (conn->output != NULL)
 		o_stream_unref(&conn->output);
 	if (conn->io != NULL)
 		io_remove(&conn->io);
+	if (conn->fd != -1) {
+		if (close(conn->fd) < 0)
+			i_error("close(): %m");
+	}
 
 	conns = array_get(&conn->listener->masters, &count);
 	for (i = 0; i < count; i++) {

Index: auth-master-listener.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-master-listener.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- auth-master-listener.c	14 Jan 2006 18:47:20 -0000	1.5
+++ auth-master-listener.c	29 Jan 2006 12:14:40 -0000	1.6
@@ -50,8 +50,8 @@
 		i_free(socket->path);
 	}
 
-	net_disconnect(socket->fd);
 	io_remove(&socket->io);
+	net_disconnect(socket->fd);
 	i_free(socket);
 }
 

Index: auth-worker-server.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/auth-worker-server.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- auth-worker-server.c	14 Jan 2006 18:47:20 -0000	1.7
+++ auth-worker-server.c	29 Jan 2006 12:14:40 -0000	1.8
@@ -125,13 +125,14 @@
 		}
 	}
 
-	if (close(conn->fd) < 0)
-		i_error("close(auth worker) failed: %m");
 
 	buffer_free(conn->requests);
 	io_remove(&conn->io);
 	i_stream_unref(&conn->input);
 	o_stream_unref(&conn->output);
+
+	if (close(conn->fd) < 0)
+		i_error("close(auth worker) failed: %m");
 	i_free(conn);
 }
 

Index: passdb-checkpassword.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/auth/passdb-checkpassword.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- passdb-checkpassword.c	25 Jan 2006 17:29:04 -0000	1.15
+++ passdb-checkpassword.c	29 Jan 2006 12:14:40 -0000	1.16
@@ -271,11 +271,11 @@
 	if (request->write_pos < size)
 		return;
 
+	io_remove(&request->io_out);
+
 	if (close(request->fd_out) < 0)
 		i_error("checkpassword: close() failed: %m");
         request->fd_out = -1;
-
-	io_remove(&request->io_out);
 }
 
 static void



More information about the dovecot-cvs mailing list