Commit 4bd74cea authored by Olivier Crête's avatar Olivier Crête

component: Wake up app if Component is gone

If the component is gone, return an error to the APP to wake it up.
parent a42bf857
......@@ -1124,6 +1124,7 @@ component_source_prepare (GSource *source, gint *timeout_)
NiceAgent *agent;
Component *component;
GSList *parentl, *childl;
gboolean ret = FALSE;
component_source->current_condition = 0;
......@@ -1137,7 +1138,9 @@ component_source_prepare (GSource *source, gint *timeout_)
component_source->socket_sources =
g_slist_delete_link (component_source->socket_sources, childl);
}
return FALSE;
component_source->current_condition = G_IO_ERR;
return TRUE;
}
/* Needed due to accessing the Component. */
......@@ -1154,6 +1157,8 @@ component_source_prepare (GSource *source, gint *timeout_)
component_source->socket_sources =
g_slist_delete_link (component_source->socket_sources, childl);
}
component_source->current_condition = G_IO_ERR;
ret = TRUE;
goto done;
}
......@@ -1236,7 +1241,7 @@ component_source_prepare (GSource *source, gint *timeout_)
/* We can’t be sure if the ComponentSource itself needs to be dispatched until
* poll() is called on all the child sources. */
return FALSE;
return ret;
}
static gboolean
......
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