aboutsummaryrefslogtreecommitdiffstats
path: root/src/input
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-09-16 08:45:39 +0200
committerMax Kellermann <max@duempel.org>2011-09-16 09:10:39 +0200
commitbf1eb46b8733a81d9c904a200ffcd4fd8db413de (patch)
treed7624be08888babc731d676285a487c8a8a38768 /src/input
parent7e27d660e245506e60eecc21507258c0a6c33123 (diff)
downloadmpd-bf1eb46b8733a81d9c904a200ffcd4fd8db413de.tar.gz
mpd-bf1eb46b8733a81d9c904a200ffcd4fd8db413de.tar.xz
mpd-bf1eb46b8733a81d9c904a200ffcd4fd8db413de.zip
input/curl: unlock the mutex for io_thread_call()
Fix deadlock.
Diffstat (limited to '')
-rw-r--r--src/input/curl_input_plugin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c
index dfe2e53c5..fdfc3ae05 100644
--- a/src/input/curl_input_plugin.c
+++ b/src/input/curl_input_plugin.c
@@ -965,8 +965,11 @@ input_curl_read(struct input_stream *is, void *ptr, size_t size,
is->offset += (goffset)nbytes;
#if LIBCURL_VERSION_NUM >= 0x071200
- if (c->paused && curl_total_buffer_size(c) < CURL_MAX_BUFFERED)
+ if (c->paused && curl_total_buffer_size(c) < CURL_MAX_BUFFERED) {
+ g_mutex_unlock(c->mutex);
io_thread_call(input_curl_resume, c);
+ g_mutex_lock(c->mutex);
+ }
#endif
g_mutex_unlock(c->mutex);