From 6fdae1139fabf5dd7b3a47e22e3519409556380e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 29 Apr 2020 23:19:13 +0200 Subject: [PATCH 1/5] increment version number to 0.21.24 --- NEWS | 2 ++ android/AndroidManifest.xml | 4 ++-- doc/conf.py | 2 +- meson.build | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index d64d9e50e..fa4954baa 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.21.24 (not yet released) + ver 0.21.23 (2020/04/23) * protocol - add tag fallback for AlbumSort diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 64d0802b1..bde283bce 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="47" + android:versionName="0.21.24"> diff --git a/doc/conf.py b/doc/conf.py index 246aa98c3..c76f391da 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -38,7 +38,7 @@ author = 'Max Kellermann' # built documents. # # The short X.Y version. -version = '0.21.23' +version = '0.21.24' # The full version, including alpha/beta/rc tags. release = version diff --git a/meson.build b/meson.build index 800785b85..7c5dcac9f 100644 --- a/meson.build +++ b/meson.build @@ -1,7 +1,7 @@ project( 'mpd', ['c', 'cpp'], - version: '0.21.23', + version: '0.21.24', meson_version: '>= 0.49.0', default_options: [ 'c_std=c99', From 47a7707df131e1b42c64da9a9e85e0421faa49a4 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Mon, 27 Apr 2020 16:32:29 -0700 Subject: [PATCH 2/5] Math.hxx: fix wrong macro name _GLIBCXX_USE_C99_MATH_TR1 is the correct one. _GLIBCXX_USE_C99_MATH is always defined. --- src/util/Math.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util/Math.hxx b/src/util/Math.hxx index ad5cffd82..28f50c6cc 100644 --- a/src/util/Math.hxx +++ b/src/util/Math.hxx @@ -36,7 +36,7 @@ * C99 math can be optionally omitted with gcc's libstdc++. * Use boost if unavailable. */ -#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && !defined(_GLIBCXX_USE_C99_MATH) +#if (defined(__GLIBCPP__) || defined(__GLIBCXX__)) && !defined(_GLIBCXX_USE_C99_MATH_TR1) #include using boost::math::lround; #else From 7aea2853612743e111ae5e947c8d467049e291a8 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Apr 2020 06:57:04 +0200 Subject: [PATCH 3/5] Revert "Fix unsafe float comparison." This reverts commit a5273d699274c0a6274052bb80fcfdd5c7fac88b. It was wrong and broke the MixRamp unit test. Closes https://github.com/MusicPlayerDaemon/MPD/issues/844 --- NEWS | 1 + src/player/CrossFade.cxx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index fa4954baa..25181d973 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,5 @@ ver 0.21.24 (not yet released) +* fix unit test failure ver 0.21.23 (2020/04/23) * protocol diff --git a/src/player/CrossFade.cxx b/src/player/CrossFade.cxx index beb9b18a5..b31610e66 100644 --- a/src/player/CrossFade.cxx +++ b/src/player/CrossFade.cxx @@ -62,7 +62,7 @@ mixramp_interpolate(const char *ramp_list, float required_db) noexcept ++ramp_list; /* Check for exact match. */ - if (db >= required_db) { + if (db == required_db) { return duration; } From 24afdee35ce3ed64823ead05930d452f0fb9e98a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 30 Apr 2020 13:07:42 +0200 Subject: [PATCH 4/5] command/all: "tagtypes" requires no permissions The command is used to configure the client's connection, and this shouldn't require any permissions. The client should be able to do that before sending a password. --- NEWS | 2 ++ src/command/AllCommands.cxx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 25181d973..0836c5ce8 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.21.24 (not yet released) +* protocol + - "tagtypes" requires no permissions * fix unit test failure ver 0.21.23 (2020/04/23) diff --git a/src/command/AllCommands.cxx b/src/command/AllCommands.cxx index 7926b7128..3fb305527 100644 --- a/src/command/AllCommands.cxx +++ b/src/command/AllCommands.cxx @@ -193,7 +193,7 @@ static constexpr struct command commands[] = { { "subscribe", PERMISSION_READ, 1, 1, handle_subscribe }, { "swap", PERMISSION_CONTROL, 2, 2, handle_swap }, { "swapid", PERMISSION_CONTROL, 2, 2, handle_swapid }, - { "tagtypes", PERMISSION_READ, 0, -1, handle_tagtypes }, + { "tagtypes", PERMISSION_NONE, 0, -1, handle_tagtypes }, { "toggleoutput", PERMISSION_ADMIN, 1, 1, handle_toggleoutput }, #ifdef ENABLE_DATABASE { "unmount", PERMISSION_ADMIN, 1, 1, handle_unmount }, From 209364adf2c143d2979f95f748b9aef642bde0d9 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 5 May 2020 18:57:13 +0200 Subject: [PATCH 5/5] db/simple: fix crash when mounting twice The `db->close()` call was a `nullptr` dereference because the `db` variable had already been moved. Closes https://github.com/MusicPlayerDaemon/MPD/issues/839 --- NEWS | 2 ++ src/db/plugins/simple/SimpleDatabasePlugin.cxx | 7 +------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/NEWS b/NEWS index 0836c5ce8..d3e275df3 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ ver 0.21.24 (not yet released) * protocol - "tagtypes" requires no permissions +* database + - simple: fix crash when mounting twice * fix unit test failure ver 0.21.23 (2020/04/23) diff --git a/src/db/plugins/simple/SimpleDatabasePlugin.cxx b/src/db/plugins/simple/SimpleDatabasePlugin.cxx index ebb34ee14..5350db6d8 100644 --- a/src/db/plugins/simple/SimpleDatabasePlugin.cxx +++ b/src/db/plugins/simple/SimpleDatabasePlugin.cxx @@ -449,12 +449,7 @@ SimpleDatabase::Mount(const char *local_uri, const char *storage_uri) // TODO: update the new database instance? - try { - Mount(local_uri, std::move(db)); - } catch (...) { - db->Close(); - throw; - } + Mount(local_uri, std::move(db)); } inline DatabasePtr