Mercurial > dovecot > core-2.2
changeset 11584:e6f15ba78007 HEAD
director-test: Some fixes
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Fri, 18 Jun 2010 19:20:38 +0100 |
parents | da7a307ab4f1 |
children | f0fb8151c6b4 |
files | src/director/director-test.c |
diffstat | 1 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/director/director-test.c Fri Jun 18 16:51:48 2010 +0100 +++ b/src/director/director-test.c Fri Jun 18 19:20:38 2010 +0100 @@ -35,7 +35,7 @@ #define DIRECTOR_OUT_PORT 9090 #define USER_TIMEOUT_MSECS (1000*60) #define ADMIN_RANDOM_TIMEOUT_MSECS 500 -#define DIRECTOR_CONN_MAX_DELAY_MSECS 1000 +#define DIRECTOR_CONN_MAX_DELAY_MSECS 100 struct host { int refcount; @@ -134,7 +134,6 @@ if (user == NULL) { user = i_new(struct user, 1); user->username = i_strdup(client->username); - user->host = host; hash_table_insert(users, user->username, user); } else if (user->host != host) { i_error("user %s: old connection from %s, new from %s. " @@ -142,9 +141,10 @@ user->username, net_ip2addr(&user->host->ip), net_ip2addr(&host->ip), user->connections, (unsigned int)(ioloop_time - user->last_seen)); - return; + host_unref(&user->host); } client->user = user; + user->host = host; user->connections++; user->last_seen = ioloop_time; user->host->refcount++; @@ -324,9 +324,6 @@ director_connection_in_input, conn); conn->out_io = io_add(conn->out_fd, IO_READ, director_connection_out_input, conn); - - director_connection_in_input(conn); - director_connection_out_input(conn); } static void