]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
director: Call state_change_callback on user move timeout.
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Mon, 24 Oct 2016 16:59:54 +0000 (19:59 +0300)
committerGitLab <gitlab@git.dovecot.net>
Tue, 25 Oct 2016 17:33:27 +0000 (20:33 +0300)
src/director/director.c
src/director/director.h
src/director/main.c

index 41bf86f5df430e84f1c2d5e862d79f458925c30e..eb2e6038d9a8db3512ec4e0af6d6ca7eb5619b0a 100644 (file)
@@ -925,6 +925,10 @@ static void director_user_move_timeout(struct user *user)
 
        user->kill_state = USER_KILL_STATE_NONE;
        timeout_remove(&user->to_move);
+
+       /* FIXME: shouldn't use global director, but for now there's no easy
+          way to get access to it otherwise */
+       director->state_change_callback(director);
 }
 
 void director_move_user(struct director *dir, struct director_host *src,
index 508f540646c636428ba09e0b8e3768d610376b9a..a32f7ec1e01427cd5612f0b9a340e48ef600c9de 100644 (file)
@@ -100,6 +100,7 @@ struct director {
 };
 
 extern bool director_debug;
+extern struct director *director; /* FIXME: shouldn't be global */
 
 /* Create a new director. If listen_ip specifies an actual IP, it's used with
    listen_port for finding ourself from the director_servers setting.
index 6ed901a579bbd112f8bd2fc357452ec70199705d..2bd94ed0088da8237d6408450cd244edd3af4545 100644 (file)
@@ -35,7 +35,7 @@ enum director_socket_type {
        DIRECTOR_SOCKET_TYPE_DOVEADM
 };
 
-static struct director *director;
+struct director *director;
 static struct notify_connection *notify_conn;
 static struct timeout *to_proctitle_refresh;
 static ARRAY(enum director_socket_type) listener_socket_types;