Loading include/norns/nornsctl_types.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ typedef uint32_t nornsctl_backend_flags_t; /* Administrative command IDs valid for nornsctl_send_command() */ typedef enum { NORNSCTL_CMD_PING = 1000, NORNSCTL_CMD_PAUSE_ACCEPT, NORNSCTL_CMD_PAUSE_LISTEN, NORNSCTL_CMD_RESUME_ACCEPT, NORNSCTL_CMD_SHUTDOWN, } nornsctl_command_t; Loading src/api/request.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -81,8 +81,8 @@ norns::command_type decode_command(::google::protobuf::uint32 type) { switch(type) { case NORNSCTL_CMD_PING: return command_type::ping; case NORNSCTL_CMD_PAUSE_ACCEPT: return command_type::pause_accept; case NORNSCTL_CMD_PAUSE_LISTEN: return command_type::pause_listen; case NORNSCTL_CMD_RESUME_ACCEPT: return command_type::resume_accept; case NORNSCTL_CMD_SHUTDOWN: Loading Loading @@ -429,8 +429,8 @@ std::string command_request::to_string() const { switch(this->get<0>()) { case command_type::ping: return "PING"; case command_type::pause_accept: return "PAUSE_ACCEPT"; case command_type::pause_listen: return "PAUSE_LISTEN"; case command_type::resume_accept: return "RESUME_ACCEPT"; case command_type::shutdown: Loading src/common/types.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ enum class backend_type { enum class command_type { ping, pause_accept, pause_listen, resume_accept, shutdown, unknown Loading src/urd.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -585,8 +585,8 @@ urd::command_handler(const request_ptr base_request) { switch(request->get<0>()) { case command_type::ping: break; // nothing special to do here case command_type::pause_accept: pause_accept(); case command_type::pause_listen: pause_listening(); break; case command_type::resume_accept: resume_accept(); Loading @@ -594,7 +594,7 @@ urd::command_handler(const request_ptr base_request) { case command_type::shutdown: { LOGGER_WARN("Shutdown requested!"); pause_accept(); pause_listening(); const auto rv = check_shutdown(); resp->set_error_code(rv); Loading Loading @@ -1032,7 +1032,7 @@ void urd::print_farewell() { LOGGER_INFO("{}", fsep); } void urd::pause_accept() { void urd::pause_listening() { bool expected = false; while(!m_is_paused.compare_exchange_weak(expected, true) && !expected); Loading src/urd.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ private: bool track, const bfs::path& mount, uint32_t quota); void pause_accept(); void pause_listening(); void resume_accept(); urd_error check_shutdown(); Loading Loading
include/norns/nornsctl_types.h +1 −1 Original line number Diff line number Diff line Loading @@ -41,7 +41,7 @@ typedef uint32_t nornsctl_backend_flags_t; /* Administrative command IDs valid for nornsctl_send_command() */ typedef enum { NORNSCTL_CMD_PING = 1000, NORNSCTL_CMD_PAUSE_ACCEPT, NORNSCTL_CMD_PAUSE_LISTEN, NORNSCTL_CMD_RESUME_ACCEPT, NORNSCTL_CMD_SHUTDOWN, } nornsctl_command_t; Loading
src/api/request.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -81,8 +81,8 @@ norns::command_type decode_command(::google::protobuf::uint32 type) { switch(type) { case NORNSCTL_CMD_PING: return command_type::ping; case NORNSCTL_CMD_PAUSE_ACCEPT: return command_type::pause_accept; case NORNSCTL_CMD_PAUSE_LISTEN: return command_type::pause_listen; case NORNSCTL_CMD_RESUME_ACCEPT: return command_type::resume_accept; case NORNSCTL_CMD_SHUTDOWN: Loading Loading @@ -429,8 +429,8 @@ std::string command_request::to_string() const { switch(this->get<0>()) { case command_type::ping: return "PING"; case command_type::pause_accept: return "PAUSE_ACCEPT"; case command_type::pause_listen: return "PAUSE_LISTEN"; case command_type::resume_accept: return "RESUME_ACCEPT"; case command_type::shutdown: Loading
src/common/types.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -64,7 +64,7 @@ enum class backend_type { enum class command_type { ping, pause_accept, pause_listen, resume_accept, shutdown, unknown Loading
src/urd.cpp +4 −4 Original line number Diff line number Diff line Loading @@ -585,8 +585,8 @@ urd::command_handler(const request_ptr base_request) { switch(request->get<0>()) { case command_type::ping: break; // nothing special to do here case command_type::pause_accept: pause_accept(); case command_type::pause_listen: pause_listening(); break; case command_type::resume_accept: resume_accept(); Loading @@ -594,7 +594,7 @@ urd::command_handler(const request_ptr base_request) { case command_type::shutdown: { LOGGER_WARN("Shutdown requested!"); pause_accept(); pause_listening(); const auto rv = check_shutdown(); resp->set_error_code(rv); Loading Loading @@ -1032,7 +1032,7 @@ void urd::print_farewell() { LOGGER_INFO("{}", fsep); } void urd::pause_accept() { void urd::pause_listening() { bool expected = false; while(!m_is_paused.compare_exchange_weak(expected, true) && !expected); Loading
src/urd.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -123,7 +123,7 @@ private: bool track, const bfs::path& mount, uint32_t quota); void pause_accept(); void pause_listening(); void resume_accept(); urd_error check_shutdown(); Loading