diff options
author | Max Kellermann <max@duempel.org> | 2011-09-15 08:17:36 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-15 09:27:16 +0200 |
commit | e96f8c0444a2c9b9bd754164d7d04a61da34d232 (patch) | |
tree | 763a54dddf6e02ef4350e5c13b698f1244beb3cd | |
parent | 2bf3bc3e10662f1b27af0b2a702b1a8131535cd4 (diff) | |
download | mpd-e96f8c0444a2c9b9bd754164d7d04a61da34d232.tar.gz mpd-e96f8c0444a2c9b9bd754164d7d04a61da34d232.tar.xz mpd-e96f8c0444a2c9b9bd754164d7d04a61da34d232.zip |
input/curl: don't set "ready" on _easy_free()
Move the assignment to _request_done(), right before the GCond is
signalled. This might fix spurious wakeups.
-rw-r--r-- | src/input/curl_input_plugin.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/input/curl_input_plugin.c b/src/input/curl_input_plugin.c index 0aee4a044..1969ceb7e 100644 --- a/src/input/curl_input_plugin.c +++ b/src/input/curl_input_plugin.c @@ -383,8 +383,6 @@ input_curl_easy_free(struct input_curl *c) g_free(c->range); c->range = NULL; - - c->base.ready = true; } static gpointer @@ -432,6 +430,7 @@ input_curl_abort_all_requests(GError *error) input_curl_easy_free(c); c->postponed_error = g_error_copy(error); + c->base.ready = true; } g_error_free(error); @@ -450,7 +449,6 @@ input_curl_request_done(struct input_curl *c, CURLcode result, long status) assert(io_thread_inside()); assert(c != NULL); assert(c->easy == NULL); - assert(c->base.ready); assert(c->postponed_error == NULL); if (result != CURLE_OK) { @@ -463,6 +461,7 @@ input_curl_request_done(struct input_curl *c, CURLcode result, long status) status); } + c->base.ready = true; g_cond_broadcast(curl.cond); } |