dovecot-1.2: login proxy: Don't give "tried to change state 2 ->...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Oct 12 21:05:08 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/bf11870ecb02
changeset: 9424:bf11870ecb02
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 12 14:05:02 2009 -0400
description:
login proxy: Don't give "tried to change state 2 -> 2" errors with login_process_per_connection=yes.
diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
src/login-common/login-proxy.c | 7 +++++--
diffs (31 lines):
diff -r c50acaf1f09f -r bf11870ecb02 src/login-common/login-proxy.c
--- a/src/login-common/login-proxy.c Mon Oct 12 12:36:38 2009 -0400
+++ b/src/login-common/login-proxy.c Mon Oct 12 14:05:02 2009 -0400
@@ -252,6 +252,7 @@ void login_proxy_free(struct login_proxy
{
struct login_proxy *proxy = *_proxy;
const char *ipstr;
+ bool detached;
*_proxy = NULL;
@@ -274,7 +275,8 @@ void login_proxy_free(struct login_proxy
if (proxy->server_output != NULL)
o_stream_destroy(&proxy->server_output);
- if (proxy->client_fd != -1) {
+ detached = proxy->client_fd != -1;
+ if (detached) {
/* detached proxy */
main_unref();
DLLIST_REMOVE(&login_proxies, proxy);
@@ -305,7 +307,8 @@ void login_proxy_free(struct login_proxy
i_free(proxy->user);
i_free(proxy);
- main_listen_start();
+ if (detached)
+ main_listen_start();
}
bool login_proxy_is_ourself(const struct client *client, const char *host,
More information about the dovecot-cvs
mailing list