MCPcopy Create free account
hub / github.com/MusicPlayerDaemon/MPD / ProcessCommandList

Method ProcessCommandList

src/client/Process.cxx:16–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14#define CLIENT_LIST_MODE_END "command_list_end"
15
16inline CommandResult
17Client::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]]
40static bool

Callers

nothing calls this directly

Calls 1

command_processFunction · 0.85

Tested by

no test coverage detected