diff --git a/NEWS b/NEWS index 3e559dcfc..f183d874c 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,10 @@ ver 0.24 (not yet released) * remove Haiku support * require libfmt 7 or later +ver 0.23.12 (not yet released) +* tags + - fix crash bug due to race condition + ver 0.23.11 (2022/11/28) * database - simple: move default database to ~/.cache/mpd/db from ~/.cache/mpd.db diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 41320212f..68028d594 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -2,8 +2,8 @@ + android:versionCode="71" + android:versionName="0.23.12"> diff --git a/src/RemoteTagCache.hxx b/src/RemoteTagCache.hxx index 116a753b5..4fa6fab6d 100644 --- a/src/RemoteTagCache.hxx +++ b/src/RemoteTagCache.hxx @@ -27,7 +27,11 @@ #include "util/IntrusiveList.hxx" #include "util/IntrusiveHashSet.hxx" +#include +#include +#include #include +#include class RemoteTagCacheHandler; diff --git a/src/io/FileReader.hxx b/src/io/FileReader.hxx index fd3c709e9..c39b8f47e 100644 --- a/src/io/FileReader.hxx +++ b/src/io/FileReader.hxx @@ -42,6 +42,8 @@ #include "io/UniqueFileDescriptor.hxx" #endif +#include + class Path; class FileInfo; diff --git a/src/lib/curl/Easy.hxx b/src/lib/curl/Easy.hxx index fd2cceef0..3bfcc0952 100644 --- a/src/lib/curl/Easy.hxx +++ b/src/lib/curl/Easy.hxx @@ -187,10 +187,6 @@ public: SetOption(CURLOPT_POSTFIELDSIZE, (long)size); } - void SetHttpPost(const struct curl_httppost *post) { - SetOption(CURLOPT_HTTPPOST, post); - } - template bool GetInfo(CURLINFO info, T value_r) const noexcept { return ::curl_easy_getinfo(handle, info, value_r) == CURLE_OK; @@ -200,10 +196,10 @@ public: * Returns the response body's size, or -1 if that is unknown. */ [[gnu::pure]] - int64_t GetContentLength() const noexcept { - double value; - return GetInfo(CURLINFO_CONTENT_LENGTH_DOWNLOAD, &value) - ? (int64_t)value + curl_off_t GetContentLength() const noexcept { + curl_off_t value; + return GetInfo(CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &value) + ? value : -1; } diff --git a/src/tag/Builder.cxx b/src/tag/Builder.cxx index 72dbd8eff..ee207308a 100644 --- a/src/tag/Builder.cxx +++ b/src/tag/Builder.cxx @@ -261,8 +261,14 @@ TagBuilder::RemoveAll() noexcept void TagBuilder::RemoveType(TagType type) noexcept { + if (items.empty()) + /* don't acquire the tag_pool_lock if we're not going + to call tag_pool_put_item() anyway */ + return; + const auto begin = items.begin(), end = items.end(); + const std::scoped_lock protect(tag_pool_lock); items.erase(std::remove_if(begin, end, [type](TagItem *item) { if (item->type != type)