diff src/director/director-connection.c @ 20986:410eacd7ad40

director: Code cleanup - added USER_IS_BEING_KILLED() macro
author Timo Sirainen <timo.sirainen@dovecot.fi>
date Thu, 20 Oct 2016 16:46:31 +0300
parents 699e305f6a39
children 9d4039e2ae25
line wrap: on
line diff
--- a/src/director/director-connection.c	Thu Oct 20 16:41:23 2016 +0300
+++ b/src/director/director-connection.c	Thu Oct 20 16:46:31 2016 +0300
@@ -549,7 +549,7 @@
 			  "replacing host %s with %s", username_hash,
 			  net_ip2addr(&user->host->ip), net_ip2addr(&host->ip));
 		ret = TRUE;
-	} else if (user->kill_state != USER_KILL_STATE_NONE) {
+	} else if (USER_IS_BEING_KILLED(user)) {
 		/* user is still being moved - ignore conflicting host updates
 		   from other directors who don't yet know about the move. */
 		dir_debug("user refresh: %u is being moved, "
@@ -574,7 +574,7 @@
 		}
 		if (user->to_move != NULL)
 			str_append(str, ",moving");
-		if (user->kill_state != USER_KILL_STATE_NONE) {
+		if (USER_IS_BEING_KILLED(user)) {
 			str_printfa(str, ",kill_state=%s",
 				    user_kill_state_names[user->kill_state]);
 		}