From: Timo Sirainen Date: Wed, 7 Apr 2010 08:33:28 +0000 (+0300) Subject: lib-master: Fixed checking if login connection was already closed. X-Git-Tag: 2.0.beta5~170 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8149f4a09d07464f33de747d8e1e620f6d9f7fae;p=thirdparty%2Fdovecot%2Fcore.git lib-master: Fixed checking if login connection was already closed. --HG-- branch : HEAD --- diff --git a/src/lib-master/master-login.c b/src/lib-master/master-login.c index 6c2679b0dd..a37d9ffd1c 100644 --- a/src/lib-master/master-login.c +++ b/src/lib-master/master-login.c @@ -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);