]> 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)
committerTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 25 Oct 2016 18:01:22 +0000 (21:01 +0300)
src/director/director.c
src/director/director.h
src/director/main.c

index 9f1999a7cafa3eaab958333ffff711444a914af5..0050948bd0f701daf62ce7635bd8ee4ae710e77e 100644 (file)
@@ -927,6 +927,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 5e4b1327ac1e36438c9b33f29e456468b54107e7..64681cfe6974fd2fa5455cb75261fe2af099ce44 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 243f7098e0b6c5b708ff231baaea1b23e2ac0a39..a65ed9d59c5ccf28084d305901c9a3f3b6611a2e 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;