From 8b657255cc30019e97dcce8741167ff9efaef019 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2011 07:13:28 +0200 Subject: input/soup: remove redundant flag "ready" We'll add proper locking now, and there's no need to carry this duplicate flag. --- src/input/soup_input_plugin.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/input/soup_input_plugin.c b/src/input/soup_input_plugin.c index dfd3c2780..56aedc475 100644 --- a/src/input/soup_input_plugin.c +++ b/src/input/soup_input_plugin.c @@ -57,7 +57,7 @@ struct input_soup { size_t total_buffered; - bool alive, ready, pause, eof; + bool alive, pause, eof; }; static inline GQuark @@ -135,7 +135,7 @@ input_soup_got_headers(SoupMessage *msg, gpointer user_data) soup_message_body_set_accumulate(msg->response_body, false); g_mutex_lock(s->mutex); - s->ready = true; + s->base.ready = true; g_cond_broadcast(s->cond); g_mutex_unlock(s->mutex); } @@ -226,7 +226,6 @@ input_soup_open(const char *uri, G_GNUC_UNUSED GError **error_r) G_CALLBACK(input_soup_got_body), s); s->alive = true; - s->ready = false; s->pause = false; s->eof = false; @@ -285,7 +284,6 @@ input_soup_buffer(struct input_stream *is, GError **error_r) bool success = input_soup_wait_data(s); - s->base.ready = s->ready; g_mutex_unlock(s->mutex); if (!success) { @@ -312,8 +310,6 @@ input_soup_read(struct input_stream *is, void *ptr, size_t size, return 0; } - s->base.ready = s->ready; - char *p0 = ptr, *p = p0, *p_end = p0 + size; while (p < p_end) { -- cgit v1.2.3