diff options
author | Max Kellermann <max@duempel.org> | 2011-09-15 21:13:46 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-16 11:30:30 +0200 |
commit | 0ef15e5fac1f00a159a157bcd82d22b2d2eaea53 (patch) | |
tree | 7357e5dad83ca785d85d9baea9bdc2cd630a5c0b /src | |
parent | 9ea8a840a9f9a42437d74bf0e0c267c84ff40f8b (diff) | |
download | mpd-0ef15e5fac1f00a159a157bcd82d22b2d2eaea53.tar.gz mpd-0ef15e5fac1f00a159a157bcd82d22b2d2eaea53.tar.xz mpd-0ef15e5fac1f00a159a157bcd82d22b2d2eaea53.zip |
input/soup: unlock before cancelling the soup message
Avoid recursive deadlock in _session_callback().
Diffstat (limited to 'src')
-rw-r--r-- | src/input/soup_input_plugin.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/input/soup_input_plugin.c b/src/input/soup_input_plugin.c index 38a607045..7a2f3b47a 100644 --- a/src/input/soup_input_plugin.c +++ b/src/input/soup_input_plugin.c @@ -246,12 +246,14 @@ input_soup_close(struct input_stream *is) if (s->alive) { assert(s->msg != NULL); + s->alive = false; + g_mutex_unlock(s->mutex); + soup_session_cancel_message(soup_session, s->msg, SOUP_STATUS_CANCELLED); - s->alive = false; - } + } else + g_mutex_unlock(s->mutex); - g_mutex_unlock(s->mutex); g_mutex_free(s->mutex); g_cond_free(s->cond); |