aboutsummaryrefslogtreecommitdiffstats
path: root/src/command/FileCommands.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-08-13 12:48:31 +0200
committerMax Kellermann <max@duempel.org>2015-08-13 12:48:31 +0200
commit86e036c3933def22b6ff0eae5bcf9cd7103240e7 (patch)
treee8d812461e22b189cea3b3df908515cebbfe0cd1 /src/command/FileCommands.cxx
parent7652a2986b0d0ad55b2776685130f1c68d7108c7 (diff)
downloadmpd-86e036c3933def22b6ff0eae5bcf9cd7103240e7.tar.gz
mpd-86e036c3933def22b6ff0eae5bcf9cd7103240e7.tar.xz
mpd-86e036c3933def22b6ff0eae5bcf9cd7103240e7.zip
command: pass Response object to command callbacks
Diffstat (limited to '')
-rw-r--r--src/command/FileCommands.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/command/FileCommands.cxx b/src/command/FileCommands.cxx
index c30dad8c8..73b9b3dbe 100644
--- a/src/command/FileCommands.cxx
+++ b/src/command/FileCommands.cxx
@@ -70,10 +70,9 @@ skip_path(Path name_fs)
#endif
CommandResult
-handle_listfiles_local(Client &client, const char *path_utf8)
+handle_listfiles_local(Client &client, Response &r,
+ const char *path_utf8)
{
- Response r(client);
-
const auto path_fs = AllocatedPath::FromUTF8(path_utf8);
if (path_fs.IsNull()) {
r.Error(ACK_ERROR_NO_EXIST, "unsupported file name");
@@ -214,10 +213,8 @@ translate_uri(const char *uri)
}
CommandResult
-handle_read_comments(Client &client, Request args)
+handle_read_comments(Client &client, Request args, Response &r)
{
- Response r(client);
-
assert(args.size == 1);
const char *const uri = translate_uri(args.front());