[PATCH v5 2/7] mf/session: Move internal states to a separate command_state enum.