dovecot-2.0: director-test: Some fixes

dovecot at dovecot.org dovecot at dovecot.org
Fri Jun 18 21:21:55 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/e6f15ba78007
changeset: 11584:e6f15ba78007
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Jun 18 19:20:38 2010 +0100
description:
director-test: Some fixes

diffstat:

 src/director/director-test.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (42 lines):

diff -r da7a307ab4f1 -r e6f15ba78007 src/director/director-test.c
--- 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


More information about the dovecot-cvs mailing list