Acked-by: Snir Sheriber <[email protected]> On 7/23/19 11:22 AM, Frediano Ziglio wrote:
Signed-off-by: Frediano Ziglio <[email protected]> --- server/tests/replay.c | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)diff --git a/server/tests/replay.c b/server/tests/replay.c index e3ef7bf15..992f26d63 100644 --- a/server/tests/replay.c +++ b/server/tests/replay.c @@ -116,7 +116,7 @@ static gboolean fill_queue_idle(gpointer user_data) if (!cmd) { g_async_queue_push(display_queue, GINT_TO_POINTER(-1)); g_async_queue_push(cursor_queue, GINT_TO_POINTER(-1)); - goto end; + break; }++ncommands;@@ -133,7 +133,6 @@ static gboolean fill_queue_idle(gpointer user_data) } }-end:if (!keep) { pthread_mutex_lock(&mutex); if (fill_source) { @@ -153,17 +152,12 @@ static void fill_queue(void) { pthread_mutex_lock(&mutex);- if (!started)- goto end; - - if (fill_source) - goto end; - - fill_source = g_idle_source_new(); - g_source_set_callback(fill_source, fill_queue_idle, NULL, NULL); - g_source_attach(fill_source, basic_event_loop_get_context()); + if (started && fill_source == NULL) { + fill_source = g_idle_source_new(); + g_source_set_callback(fill_source, fill_queue_idle, NULL, NULL); + g_source_attach(fill_source, basic_event_loop_get_context()); + }-end:pthread_mutex_unlock(&mutex); }
_______________________________________________ Spice-devel mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/spice-devel
