| 14 | #define CLIENT_LIST_MODE_END "command_list_end" |
| 15 | |
| 16 | inline CommandResult |
| 17 | Client::ProcessCommandList(bool list_ok, |
| 18 | std::list<std::string> &&list) noexcept |
| 19 | { |
| 20 | unsigned n = 0; |
| 21 | |
| 22 | for (auto &&i : list) { |
| 23 | char *cmd = &*i.begin(); |
| 24 | |
| 25 | FmtDebug(client_domain, "process command {:?}", cmd); |
| 26 | auto ret = command_process(*this, n++, cmd); |
| 27 | FmtDebug(client_domain, "command returned {}", unsigned(ret)); |
| 28 | if (IsExpired()) |
| 29 | return CommandResult::CLOSE; |
| 30 | else if (ret != CommandResult::OK) |
| 31 | return ret; |
| 32 | else if (list_ok) |
| 33 | Write("list_OK\n"); |
| 34 | } |
| 35 | |
| 36 | return CommandResult::OK; |
| 37 | } |
| 38 | |
| 39 | [[gnu::pure]] |
| 40 | static bool |
nothing calls this directly
no test coverage detected