dovecot-2.2: director: Fixed weak-user handling when there is on...

dovecot at dovecot.org dovecot at dovecot.org
Wed Sep 26 18:01:29 EEST 2012


details:   http://hg.dovecot.org/dovecot-2.2/rev/f9424b066dcb
changeset: 15143:f9424b066dcb
user:      Timo Sirainen <tss at iki.fi>
date:      Tue Sep 18 20:48:25 2012 +0300
description:
director: Fixed weak-user handling when there is only one director.

diffstat:

 src/director/director-request.c |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r a200fdbc1fa0 -r f9424b066dcb src/director/director-request.c
--- a/src/director/director-request.c	Tue Sep 18 20:09:03 2012 +0300
+++ b/src/director/director-request.c	Tue Sep 18 20:48:25 2012 +0300
@@ -136,6 +136,15 @@
 		   its existing connections have been killed */
 		return FALSE;
 	}
+	if (dir->right == NULL && dir->ring_synced) {
+		/* looks like all the other directors have died. we can do
+		   whatever we want without breaking anything. remove the
+		   user's weakness just in case it was set to TRUE when we
+		   had more directors. */
+		user->weak = FALSE;
+		return TRUE;
+	}
+
 	if (user->weak) {
 		/* wait for user to become non-weak */
 		return FALSE;


More information about the dovecot-cvs mailing list