Compare commits

...

11 Commits

Author SHA1 Message Date
Max Kellermann
97a1a04116 release v0.19.1 2014-10-19 01:03:17 +02:00
Max Kellermann
493cd866f1 TextInputStream: manually shift the buffer before reading
Fixes truncated lines in m3u and cue files (regression by commit
67958f7).
2014-10-19 00:50:52 +02:00
Max Kellermann
063d369672 util/StaticFifoBuffer: make Shift() public 2014-10-19 00:49:08 +02:00
Max Kellermann
a0fae8dacc playlist/extm3u: strip first line for #EXTM3U detection 2014-10-17 20:45:18 +02:00
Max Kellermann
bc840b69d5 Makefile.am: distribute systemd/mpd.socket
The file systemd/mpd.service.in is being distributed implicitly, but
systemd/mpd.socket is not and needs to be added to EXTRA_DIST.
2014-10-12 08:38:52 +02:00
Max Kellermann
85301853d6 ThreadInputStream: call ThreadRead() inside the thread instead of Read()
Fixes deadlock bug in the "mms" plugin.
2014-10-11 21:59:06 +02:00
Max Kellermann
7cd53fb452 ThreadInputStream: add assertions 2014-10-11 21:57:31 +02:00
Max Kellermann
538ddf7af2 NEWS: add missing line 2014-10-11 21:48:52 +02:00
Max Kellermann
d5afa181f7 NEWS: fix typo in version number 2014-10-11 21:48:27 +02:00
Max Kellermann
8ed4124184 util/DynamicFifoBuffer: make the "Range" type public
Export it from the protected base class.  This fixes a build failure
on Mac OS X.
2014-10-11 20:28:08 +02:00
Max Kellermann
160242a74f configure.ac: prepare for 0.19.1 2014-10-11 20:25:19 +02:00
9 changed files with 31 additions and 8 deletions

@@ -2194,4 +2194,5 @@ EXTRA_DIST = $(doc_DATA) autogen.sh \
test/test_archive_zzip.sh \
$(wildcard scripts/*.sh) \
$(man_MANS) $(DOCBOOK_FILES) doc/mpdconf.example doc/doxygen.conf \
systemd/mpd.socket \
src/win32/mpd_win32_rc.rc.in src/win32/mpd.ico

9
NEWS

@@ -1,3 +1,12 @@
ver 0.19.1 (2014/10/19)
* input
- mms: fix deadlock bug
* playlist
- extm3u: fix Extended M3U detection
- m3u, extm3u, cue: fix truncated lines
* fix build failure on Mac OS X
* add missing file systemd/mpd.socket to tarball
ver 0.19 (2014/10/10)
* protocol
- new commands "addtagid", "cleartagid", "listfiles", "listmounts",

@@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.musicpd"
android:installLocation="auto"
android:versionCode="6"
android:versionName="0.19">
android:versionCode="7"
android:versionName="0.19.1">
<uses-sdk android:minSdkVersion="9" android:targetSdkVersion="17"/>

@@ -1,6 +1,6 @@
AC_PREREQ(2.60)
AC_INIT(mpd, 0.19, musicpd-dev-team@lists.sourceforge.net)
AC_INIT(mpd, 0.19.1, musicpd-dev-team@lists.sourceforge.net)
VERSION_MAJOR=0
VERSION_MINOR=19

@@ -33,6 +33,8 @@ TextInputStream::ReadLine()
if (line != nullptr)
return line;
buffer.Shift();
while (true) {
auto dest = buffer.Write();
if (dest.size < 2) {

@@ -88,7 +88,7 @@ ThreadInputStream::ThreadFunc()
Unlock();
Error error;
size_t nbytes = Read(w.data, w.size, error);
size_t nbytes = ThreadRead(w.data, w.size, error);
Lock();
cond.broadcast();
@@ -118,6 +118,8 @@ ThreadInputStream::ThreadFunc(void *ctx)
bool
ThreadInputStream::Check(Error &error)
{
assert(!thread.IsInside());
if (postponed_error.IsDefined()) {
error = std::move(postponed_error);
return false;
@@ -129,12 +131,16 @@ ThreadInputStream::Check(Error &error)
bool
ThreadInputStream::IsAvailable()
{
assert(!thread.IsInside());
return !buffer->IsEmpty() || eof || postponed_error.IsDefined();
}
inline size_t
ThreadInputStream::Read(void *ptr, size_t read_size, Error &error)
{
assert(!thread.IsInside());
while (true) {
if (postponed_error.IsDefined()) {
error = std::move(postponed_error);
@@ -161,5 +167,7 @@ ThreadInputStream::Read(void *ptr, size_t read_size, Error &error)
bool
ThreadInputStream::IsEOF()
{
assert(!thread.IsInside());
return eof;
}

@@ -39,8 +39,12 @@ public:
}
bool CheckFirstLine() {
const char *line = tis.ReadLine();
return line != nullptr && strcmp(line, "#EXTM3U") == 0;
char *line = tis.ReadLine();
if (line == nullptr)
return false;
StripRight(line);
return strcmp(line, "#EXTM3U") == 0;
}
virtual DetachedSong *NextSong() override;

@@ -43,6 +43,7 @@ public:
typedef typename ForeignFifoBuffer<T>::size_type size_type;
typedef typename ForeignFifoBuffer<T>::pointer_type pointer_type;
typedef typename ForeignFifoBuffer<T>::const_pointer_type const_pointer_type;
typedef typename ForeignFifoBuffer<T>::Range Range;
explicit DynamicFifoBuffer(size_type _capacity)
:ForeignFifoBuffer<T>(new T[_capacity], _capacity) {}

@@ -59,7 +59,6 @@ public:
constexpr
StaticFifoBuffer():head(0), tail(0) {}
protected:
void Shift() {
if (head == 0)
return;
@@ -74,7 +73,6 @@ protected:
head = 0;
}
public:
void Clear() {
head = tail = 0;
}