}
if (user->to_move != NULL)
str_append(str, ",moving");
- if (user->kill_state != USER_KILL_STATE_NONE)
- str_printfa(str, ",kill_state=%d", user->kill_state);
+ if (user->kill_state != USER_KILL_STATE_NONE) {
+ str_printfa(str, ",kill_state=%s",
+ user_kill_state_names[user->kill_state]);
+ }
str_append_c(str, ')');
i_error("%s", str_c(str));
unsigned int user_near_expiring_secs;
};
+const char *user_kill_state_names[USER_KILL_STATE_DELAY+1] = {
+ "none",
+ "killing",
+ "notify-received",
+ "waiting-for-notify",
+ "waiting-for-everyone",
+ "delay",
+};
+
static void user_move_iters(struct user_directory *dir, struct user *user)
{
struct user_directory_iter *const *iterp;
the user move (although it could be earlier if we added a new
USER-MOVED notification). */
USER_KILL_STATE_DELAY
+ /* NOTE: remember to update also user_kill_state_names[] */
};
+extern const char *user_kill_state_names[USER_KILL_STATE_DELAY+1];
struct user {
/* sorted by time */