From 7a380e77afc69a81725d410cd67082a37cf140d2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 20 Jan 2017 15:52:43 +0200 Subject: [PATCH] director: Add assert to make sure USER-MOVE doesn't change tag --- src/director/director.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/director/director.c b/src/director/director.c index 141788c71f..777baca029 100644 --- a/src/director/director.c +++ b/src/director/director.c @@ -1062,6 +1062,10 @@ void director_move_user(struct director *dir, struct director_host *src, /* user is already in this host */ return; } + /* user is looked up via the new host's tag, so if it's found + the old tag has to be the same. */ + i_assert(user->host->tag == host->tag); + user->host->user_count--; user->host = host; user->host->user_count++; -- 2.47.3