Mercurial > dovecot > core-2.2
changeset 639:252bdd1392f0 HEAD
Make sure we're not doing io_remove() for already removed IO.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 20 Nov 2002 21:49:11 +0200 |
parents | 78b261175f2d |
children | 91f2f80123f0 |
files | src/login/client-authenticate.c src/login/client.c |
diffstat | 2 files changed, 10 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/src/login/client-authenticate.c Wed Nov 20 21:45:32 2002 +0200 +++ b/src/login/client-authenticate.c Wed Nov 20 21:49:11 2002 +0200 @@ -209,8 +209,10 @@ if (auth_init_request(AUTH_METHOD_PLAIN, login_callback, client, &error)) { /* don't read any input from client until login is finished */ - io_remove(client->io); - client->io = NULL; + if (client->io != NULL) { + io_remove(client->io); + client->io = NULL; + } return TRUE; } else { client_send_tagline(client, t_strconcat( @@ -296,7 +298,8 @@ if (auth_init_request(method->method, authenticate_callback, client, &error)) { /* following input data will go to authentication */ - io_remove(client->io); + if (client->io != NULL) + io_remove(client->io); client->io = io_add(client->fd, IO_READ, client_auth_input, client); } else {
--- a/src/login/client.c Wed Nov 20 21:45:32 2002 +0200 +++ b/src/login/client.c Wed Nov 20 21:49:11 2002 +0200 @@ -55,8 +55,10 @@ /* must be removed before ssl_proxy_new(), since it may io_add() the same fd. */ - io_remove(client->io); - client->io = NULL; + if (client->io != NULL) { + io_remove(client->io); + client->io = NULL; + } fd_ssl = ssl_proxy_new(client->fd); if (fd_ssl != -1) {