Skip to content

Commit

Permalink
director: Add assert to make sure USER-MOVE doesn't change tag
Browse files Browse the repository at this point in the history
  • Loading branch information
sirainen committed Jan 24, 2017
1 parent 722cfd3 commit 30d3f03
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/director/director.c
Expand Up @@ -1059,6 +1059,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++;
Expand Down

0 comments on commit 30d3f03

Please sign in to comment.