From f6abbc01bd79d86ca72b0cbf9d0c09210866fdac Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 31 Aug 2017 19:48:35 +0200 Subject: [PATCH 1/6] increment version number to 0.20.11 --- NEWS | 2 ++ configure.ac | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 803ccfcfe..91073738b 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,5 @@ +ver 0.20.11 (not yet released) + ver 0.20.10 (2017/08/24) * decoder - ffmpeg: support MusicBrainz ID3v2 tags diff --git a/configure.ac b/configure.ac index 940a8e12d..11d869e2b 100644 --- a/configure.ac +++ b/configure.ac @@ -1,10 +1,10 @@ AC_PREREQ(2.60) -AC_INIT(mpd, 0.20.10, musicpd-dev-team@lists.sourceforge.net) +AC_INIT(mpd, 0.20.11, musicpd-dev-team@lists.sourceforge.net) VERSION_MAJOR=0 VERSION_MINOR=20 -VERSION_REVISION=10 +VERSION_REVISION=11 VERSION_EXTRA=0 AC_CONFIG_SRCDIR([src/Main.cxx]) From 3717fb6c8dab919b44361918c6f7c91efac2dcb3 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 31 Aug 2017 19:46:30 +0200 Subject: [PATCH 2/6] win32/build.py: add -march=pentium3 to fix 32 bit LAME build Workaround for the following LAME build failure: error: inlining failed in call to always_inline '_mm_sqrt_ps': target specific option mismatch This is because the LAME build scripts do not check whether SSE is available; they only check for the presence of the "xmmintrin.h" header. Requiring a Pentium 3 CPU is reasonable enough, and it's the first CPU to feature SSE support. --- win32/build.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/win32/build.py b/win32/build.py index c6dd7005e..d2b1aef1a 100755 --- a/win32/build.py +++ b/win32/build.py @@ -51,6 +51,11 @@ class CrossGccToolchain: self.strip = os.path.join(toolchain_bin, arch + '-strip') common_flags = '' + + if not x64: + # enable SSE support which is required for LAME + common_flags += ' -march=pentium3' + self.cflags = '-O2 -g ' + common_flags self.cxxflags = '-O2 -g ' + common_flags self.cppflags = '-isystem ' + os.path.join(install_prefix, 'include') From f6b56c9317ca7be2732807091d1079a54fb3a768 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 1 Sep 2017 11:30:30 +0200 Subject: [PATCH 3/6] storage/curl: move code to IsXmlContentType() --- src/storage/plugins/CurlStorage.cxx | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index d4177e4a3..9359de38e 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -247,6 +247,21 @@ ParseU64(const char *s, size_t length) return ParseU64(std::string(s, length).c_str()); } +gcc_pure +static bool +IsXmlContentType(const char *content_type) noexcept +{ + return strncmp(content_type, "text/xml", 8) == 0; +} + +gcc_pure +static bool +IsXmlContentType(const std::multimap &headers) noexcept +{ + auto i = headers.find("content-type"); + return i != headers.end() && IsXmlContentType(i->second.c_str()); +} + /** * A WebDAV PROPFIND request. Each "response" element will be passed * to OnDavResponse() (to be implemented by a derived class). @@ -308,9 +323,7 @@ private: throw FormatRuntimeError("Status %d from WebDAV server; expected \"207 Multi-Status\"", status); - auto i = headers.find("content-type"); - if (i == headers.end() || - strncmp(i->second.c_str(), "text/xml", 8) != 0) + if (!IsXmlContentType(headers)) throw std::runtime_error("Unexpected Content-Type from WebDAV server"); } From cbb9b6957fe67bbfff2fc148d8a5cf8d1fa45e82 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 1 Sep 2017 11:31:10 +0200 Subject: [PATCH 4/6] storage/curl: use StringStartsWith() --- src/storage/plugins/CurlStorage.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index 9359de38e..62defaae0 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -251,7 +251,7 @@ gcc_pure static bool IsXmlContentType(const char *content_type) noexcept { - return strncmp(content_type, "text/xml", 8) == 0; + return StringStartsWith(content_type, "text/xml"); } gcc_pure From f4f461b8bb8e572c5e434efbc80a45385e5a34c4 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 1 Sep 2017 11:32:40 +0200 Subject: [PATCH 5/6] storage/curl: support Content-Type application/xml --- NEWS | 2 ++ src/storage/plugins/CurlStorage.cxx | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 91073738b..a62ed71d1 100644 --- a/NEWS +++ b/NEWS @@ -1,4 +1,6 @@ ver 0.20.11 (not yet released) +* storage + - curl: support Content-Type application/xml ver 0.20.10 (2017/08/24) * decoder diff --git a/src/storage/plugins/CurlStorage.cxx b/src/storage/plugins/CurlStorage.cxx index 62defaae0..85863cb07 100644 --- a/src/storage/plugins/CurlStorage.cxx +++ b/src/storage/plugins/CurlStorage.cxx @@ -251,7 +251,8 @@ gcc_pure static bool IsXmlContentType(const char *content_type) noexcept { - return StringStartsWith(content_type, "text/xml"); + return StringStartsWith(content_type, "text/xml") || + StringStartsWith(content_type, "application/xml"); } gcc_pure From bc8dd57236bdd76549a5453a5e15c9c95c5dcab5 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 4 Sep 2017 08:15:41 +0200 Subject: [PATCH 6/6] doc/protocol.xml: document status/volume=-1 Closes #107 --- doc/protocol.xml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/protocol.xml b/doc/protocol.xml index dca8a75bb..4b9a4c95a 100644 --- a/doc/protocol.xml +++ b/doc/protocol.xml @@ -445,7 +445,9 @@ volume: - 0-100 + 0-100 or + -1 if the volume cannot + be determined