diff options
author | Max Kellermann <max@duempel.org> | 2011-09-16 07:18:37 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-16 11:35:02 +0200 |
commit | e99df3a3be853067fc2cdb17f1e45f61eae4b697 (patch) | |
tree | fc8af10911639ab44b82eaa7f48785a9a8f8efd5 | |
parent | 8b657255cc30019e97dcce8741167ff9efaef019 (diff) | |
download | mpd-e99df3a3be853067fc2cdb17f1e45f61eae4b697.tar.gz mpd-e99df3a3be853067fc2cdb17f1e45f61eae4b697.tar.xz mpd-e99df3a3be853067fc2cdb17f1e45f61eae4b697.zip |
input/soup: set the "ready" flag on failure
Fix deadlock.
-rw-r--r-- | src/input/soup_input_plugin.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/input/soup_input_plugin.c b/src/input/soup_input_plugin.c index 56aedc475..753bb19ab 100644 --- a/src/input/soup_input_plugin.c +++ b/src/input/soup_input_plugin.c @@ -116,6 +116,7 @@ input_soup_session_callback(G_GNUC_UNUSED SoupSession *session, assert(msg == s->msg); g_mutex_lock(s->mutex); + s->base.ready = true; s->alive = false; g_cond_broadcast(s->cond); g_mutex_unlock(s->mutex); @@ -170,6 +171,7 @@ input_soup_got_body(G_GNUC_UNUSED SoupMessage *msg, gpointer user_data) g_mutex_lock(s->mutex); + s->base.ready = true; s->eof = true; s->alive = false; |