dovecot-2.2: imap, pop3: Remove the client from clients-list at ...
dovecot at dovecot.org
dovecot at dovecot.org
Thu Jun 12 23:55:40 UTC 2014
details: http://hg.dovecot.org/dovecot-2.2/rev/53742463a9fe
changeset: 17482:53742463a9fe
user: Timo Sirainen <tss at iki.fi>
date: Fri Jun 13 02:54:21 2014 +0300
description:
imap, pop3: Remove the client from clients-list at the very end of the destroy function.
Especially with imap code the process title could have been refreshed too
early.
diffstat:
src/imap/imap-client.c | 6 +++---
src/pop3/pop3-client.c | 5 +++--
2 files changed, 6 insertions(+), 5 deletions(-)
diffs (45 lines):
diff -r 50889bc95f45 -r 53742463a9fe src/imap/imap-client.c
--- a/src/imap/imap-client.c Fri Jun 13 02:34:19 2014 +0300
+++ b/src/imap/imap-client.c Fri Jun 13 02:54:21 2014 +0300
@@ -246,9 +246,6 @@
i_info("%s %s", reason, client_stats(client));
}
- imap_client_count--;
- DLLIST_REMOVE(&imap_clients, client);
-
i_stream_close(client->input);
o_stream_close(client->output);
@@ -305,6 +302,9 @@
array_free(&client->search_updates);
pool_unref(&client->command_pool);
mail_storage_service_user_free(&client->service_user);
+
+ imap_client_count--;
+ DLLIST_REMOVE(&imap_clients, client);
pool_unref(&client->pool);
master_service_client_connection_destroyed(master_service);
diff -r 50889bc95f45 -r 53742463a9fe src/pop3/pop3-client.c
--- a/src/pop3/pop3-client.c Fri Jun 13 02:34:19 2014 +0300
+++ b/src/pop3/pop3-client.c Fri Jun 13 02:54:21 2014 +0300
@@ -584,8 +584,6 @@
client->cmd(client);
i_assert(client->cmd == NULL);
}
- pop3_client_count--;
- DLLIST_REMOVE(&pop3_clients, client);
if (client->trans != NULL) {
/* client didn't QUIT, but we still want to save any changes
@@ -632,6 +630,9 @@
if (client->fd_in != client->fd_out)
net_disconnect(client->fd_out);
mail_storage_service_user_free(&client->service_user);
+
+ pop3_client_count--;
+ DLLIST_REMOVE(&pop3_clients, client);
pool_unref(&client->pool);
master_service_client_connection_destroyed(master_service);
More information about the dovecot-cvs
mailing list