]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-master: Fixed checking if login connection was already closed.
authorTimo Sirainen <tss@iki.fi>
Wed, 7 Apr 2010 08:33:28 +0000 (11:33 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 7 Apr 2010 08:33:28 +0000 (11:33 +0300)
--HG--
branch : HEAD

src/lib-master/master-login.c

index 6c2679b0dda4bc55122477439f5c3e27fc80aeec..a37d9ffd1c842fb3574ba22ac3e21a47da823a6f 100644 (file)
@@ -18,7 +18,7 @@
 #define MASTER_LOGIN_POSTLOGIN_TIMEOUT_MSECS (60*1000)
 
 #define master_login_conn_is_closed(conn) \
-       ((conn)->output == NULL)
+       ((conn)->fd == -1)
 
 struct master_login_connection {
        struct master_login_connection *prev, *next;
@@ -409,10 +409,8 @@ void master_login_add(struct master_login *login, int fd)
 
 static void master_login_conn_close(struct master_login_connection *conn)
 {
-       if (master_login_conn_is_closed(conn)) {
-               /* already closed */
+       if (master_login_conn_is_closed(conn))
                return;
-       }
 
        DLLIST_REMOVE(&conn->login->conns, conn);