aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2015-10-20 12:07:18 +0200
committerMax Kellermann <max@duempel.org>2015-10-20 12:07:18 +0200
commit76f85e6f7bea6f286389caf96835f2cd61d0961b (patch)
treee26b3a6f13eaaa5883f3558ca8dd3b7b2714106f
parent81ce684b35ca498ef5d8c738799284476f4573a0 (diff)
downloadmpd-76f85e6f7bea6f286389caf96835f2cd61d0961b.tar.gz
mpd-76f85e6f7bea6f286389caf96835f2cd61d0961b.tar.xz
mpd-76f85e6f7bea6f286389caf96835f2cd61d0961b.zip
command/DatabaseCommands: pass URI to handle_lsinfo2()
-rw-r--r--src/command/DatabaseCommands.cxx5
-rw-r--r--src/command/DatabaseCommands.hxx2
-rw-r--r--src/command/OtherCommands.cxx2
3 files changed, 3 insertions, 6 deletions
diff --git a/src/command/DatabaseCommands.cxx b/src/command/DatabaseCommands.cxx
index 4fbae95ec..bfcf3aa54 100644
--- a/src/command/DatabaseCommands.cxx
+++ b/src/command/DatabaseCommands.cxx
@@ -52,11 +52,8 @@ handle_listfiles_db(Client &client, Response &r, const char *uri)
}
CommandResult
-handle_lsinfo2(Client &client, Request args, Response &r)
+handle_lsinfo2(Client &client, const char *uri, Response &r)
{
- /* default is root directory */
- const auto uri = args.GetOptional(0, "");
-
const DatabaseSelection selection(uri, false);
Error error;
diff --git a/src/command/DatabaseCommands.hxx b/src/command/DatabaseCommands.hxx
index 42dc75c71..660e147db 100644
--- a/src/command/DatabaseCommands.hxx
+++ b/src/command/DatabaseCommands.hxx
@@ -30,7 +30,7 @@ CommandResult
handle_listfiles_db(Client &client, Response &r, const char *uri);
CommandResult
-handle_lsinfo2(Client &client, Request request, Response &response);
+handle_lsinfo2(Client &client, const char *uri, Response &response);
CommandResult
handle_find(Client &client, Request request, Response &response);
diff --git a/src/command/OtherCommands.cxx b/src/command/OtherCommands.cxx
index be026a56a..d9c198973 100644
--- a/src/command/OtherCommands.cxx
+++ b/src/command/OtherCommands.cxx
@@ -200,7 +200,7 @@ handle_lsinfo(Client &client, Request args, Response &r)
}
#ifdef ENABLE_DATABASE
- CommandResult result = handle_lsinfo2(client, args, r);
+ CommandResult result = handle_lsinfo2(client, uri, r);
if (result != CommandResult::OK)
return result;
#endif