Commit e53f16c5 authored by Ole André Vadla Ravnås's avatar Ole André Vadla Ravnås Committed by Olivier Crête

test-io-stream-common: Fix GSource callback signature

Cannot pass g_main_loop_quit as the GSourceFunc as its return type is
void.
parent 389e7ab7
......@@ -583,11 +583,21 @@ check_for_termination (TestIOStreamThreadData *data, gsize *recv_count,
g_main_loop_quit (data->error_loop);
}
static gboolean
stop_main_loop_when_idle (gpointer data)
{
GMainLoop *loop = data;
g_main_loop_quit (loop);
return G_SOURCE_REMOVE;
}
void
stop_main_loop (GMainLoop *loop)
{
GSource *src = g_idle_source_new ();
g_source_set_callback (src, G_SOURCE_FUNC (g_main_loop_quit),
g_source_set_callback (src, stop_main_loop_when_idle,
g_main_loop_ref (loop), (GDestroyNotify) g_main_loop_unref);
g_source_attach (src, g_main_loop_get_context (loop));
g_source_unref (src);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment