Commit 81c97d8b authored by Olivier Crête's avatar Olivier Crête
Browse files

component: Use the right signature from the closure callback function

parent 63452248
......@@ -1315,21 +1315,23 @@ component_source_finalize (GSource *source)
static gboolean
component_source_closure_callback (GDatagramBased *datagram_based,
gpointer user_data)
GIOCondition condition, gpointer user_data)
GClosure *closure = user_data;
GValue param_value = G_VALUE_INIT;
GValue param_value[2] = { G_VALUE_INIT, G_VALUE_INIT };
GValue result_value = G_VALUE_INIT;
gboolean retval;
g_value_init (&result_value, G_TYPE_BOOLEAN);
g_value_init (&param_value, G_TYPE_OBJECT);
g_value_set_object (&param_value, datagram_based);
g_value_init (&param_value[0], G_TYPE_OBJECT);
g_value_set_object (&param_value[0], datagram_based);
g_value_init (&param_value[1], G_TYPE_IO_CONDITION);
g_value_set_flags (&param_value[1], condition);
g_closure_invoke (closure, &result_value, 1, &param_value, NULL);
g_closure_invoke (closure, &result_value, 2, param_value, NULL);
retval = g_value_get_boolean (&result_value);
g_value_unset (&param_value);
g_value_unset (&param_value[0]);
g_value_unset (&result_value);
return retval;
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