dovecot-2.2: director: Log a warning if user is refreshed too late.

dovecot at dovecot.org dovecot at dovecot.org
Sun May 20 03:26:26 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/2026af3cf87b
changeset: 14304:2026af3cf87b
user:      Timo Sirainen <tss at iki.fi>
date:      Wed Mar 07 16:48:47 2012 +0200
description:
director: Log a warning if user is refreshed too late.

diffstat:

 src/director/notify-connection.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (21 lines):

diff -r d048cebc1fd4 -r 2026af3cf87b src/director/notify-connection.c
--- a/src/director/notify-connection.c	Wed Mar 07 16:32:14 2012 +0200
+++ b/src/director/notify-connection.c	Wed Mar 07 16:48:47 2012 +0200
@@ -22,11 +22,17 @@
 	struct user *user;
 	const char *line;
 	unsigned int hash;
+	int diff;
 
 	while ((line = i_stream_read_next_line(conn->input)) != NULL) {
 		hash = user_directory_get_username_hash(conn->dir->users, line);
 		user = user_directory_lookup(conn->dir->users, hash);
 		if (user != NULL) {
+			diff = ioloop_time - user->timestamp;
+			if (diff >= (int)conn->dir->set->director_user_expire) {
+				i_warning("notify: User %s refreshed too late "
+					  "(%d secs)", line, diff);
+			}
 			user_directory_refresh(conn->dir->users, user);
 			director_update_user(conn->dir, conn->dir->self_host,
 					     user);


More information about the dovecot-cvs mailing list