summaryrefslogtreecommitdiff
path: root/src/db
diff options
context:
space:
mode:
authorShen-Ta Hsieh <ibmibmibm.tw@gmail.com>2020-05-30 00:30:00 +0800
committerMax Kellermann <max@musicpd.org>2020-05-29 19:00:16 +0200
commit8e07ea7ad87ac25122f5f31985ae5e25b5600c96 (patch)
treee359091ba9e0421110a11d753eda94d680174c91 /src/db
parentd751df0a73efe0645766d64a4c029b4803ebd60d (diff)
src/db: fitting libmpdclient interface
Diffstat (limited to 'src/db')
-rw-r--r--src/db/plugins/ProxyDatabasePlugin.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/db/plugins/ProxyDatabasePlugin.cxx b/src/db/plugins/ProxyDatabasePlugin.cxx
index 5894c2c90..4f8f2ef1d 100644
--- a/src/db/plugins/ProxyDatabasePlugin.cxx
+++ b/src/db/plugins/ProxyDatabasePlugin.cxx
@@ -493,9 +493,13 @@ ProxyDatabase::Connect()
try {
CheckError(connection);
- if (mpd_connection_cmp_server_version(connection, 0, 19, 0) < 0)
- throw FormatRuntimeError("Connect to MPD %s, but this plugin requires at least version 0.19",
- mpd_connection_get_server_version(connection));
+ if (mpd_connection_cmp_server_version(connection, 0, 19, 0) < 0) {
+ const unsigned *version =
+ mpd_connection_get_server_version(connection);
+ throw FormatRuntimeError("Connect to MPD %u.%u.%u, but this "
+ "plugin requires at least version 0.19",
+ version[0], version[1], version[2]);
+ }
if (!password.empty() &&
!mpd_run_password(connection, password.c_str()))