Mercurial > dovecot > core-2.2
comparison 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 |
comparison
equal
deleted
inserted
replaced
20985:52a725c67e83 | 20986:410eacd7ad40 |
---|---|
547 and we should have as well. use the new host. */ | 547 and we should have as well. use the new host. */ |
548 dir_debug("user refresh: %u is nearly expired, " | 548 dir_debug("user refresh: %u is nearly expired, " |
549 "replacing host %s with %s", username_hash, | 549 "replacing host %s with %s", username_hash, |
550 net_ip2addr(&user->host->ip), net_ip2addr(&host->ip)); | 550 net_ip2addr(&user->host->ip), net_ip2addr(&host->ip)); |
551 ret = TRUE; | 551 ret = TRUE; |
552 } else if (user->kill_state != USER_KILL_STATE_NONE) { | 552 } else if (USER_IS_BEING_KILLED(user)) { |
553 /* user is still being moved - ignore conflicting host updates | 553 /* user is still being moved - ignore conflicting host updates |
554 from other directors who don't yet know about the move. */ | 554 from other directors who don't yet know about the move. */ |
555 dir_debug("user refresh: %u is being moved, " | 555 dir_debug("user refresh: %u is being moved, " |
556 "preserve its host %s instead of replacing with %s", | 556 "preserve its host %s instead of replacing with %s", |
557 username_hash, net_ip2addr(&user->host->ip), | 557 username_hash, net_ip2addr(&user->host->ip), |
572 str_printfa(str, ",handshaking,recv_ts=%ld", | 572 str_printfa(str, ",handshaking,recv_ts=%ld", |
573 (long)timestamp); | 573 (long)timestamp); |
574 } | 574 } |
575 if (user->to_move != NULL) | 575 if (user->to_move != NULL) |
576 str_append(str, ",moving"); | 576 str_append(str, ",moving"); |
577 if (user->kill_state != USER_KILL_STATE_NONE) { | 577 if (USER_IS_BEING_KILLED(user)) { |
578 str_printfa(str, ",kill_state=%s", | 578 str_printfa(str, ",kill_state=%s", |
579 user_kill_state_names[user->kill_state]); | 579 user_kill_state_names[user->kill_state]); |
580 } | 580 } |
581 str_append_c(str, ')'); | 581 str_append_c(str, ')'); |
582 i_error("%s", str_c(str)); | 582 i_error("%s", str_c(str)); |