diff options
author | Max Kellermann <max@musicpd.org> | 2017-02-25 10:00:05 +0100 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2017-02-25 10:20:05 +0100 |
commit | 05b8ddac4c9318bd8f9851d0e5a58edd7eb9f340 (patch) | |
tree | aa7c6e232e26117c3b218b7ae2eff8b447cbc206 /src/command/PartitionCommands.cxx | |
parent | 668724de4e94c3191f0f593ba261c91d076728fc (diff) |
Client: add method GetInstance()
Diffstat (limited to 'src/command/PartitionCommands.cxx')
-rw-r--r-- | src/command/PartitionCommands.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/command/PartitionCommands.cxx b/src/command/PartitionCommands.cxx index e8072811c..a125a3c43 100644 --- a/src/command/PartitionCommands.cxx +++ b/src/command/PartitionCommands.cxx @@ -31,7 +31,7 @@ CommandResult handle_listpartitions(Client &client, Request, Response &r) { - for (const auto &partition : client.partition.instance.partitions) { + for (const auto &partition : client.GetInstance().partitions) { r.Format("partition: %s\n", partition.name.c_str()); } @@ -76,7 +76,7 @@ handle_newpartition(Client &client, Request request, Response &response) return CommandResult::ERROR; } - auto &instance = client.partition.instance; + auto &instance = client.GetInstance(); if (HasPartitionNamed(instance, name)) { response.Error(ACK_ERROR_EXIST, "name already exists"); return CommandResult::ERROR; |