Commit 6c893546 authored by Olivier Crête's avatar Olivier Crête

component: Remove return value from *_restart() functions, they can't fail

parent f5373319
......@@ -3695,7 +3695,6 @@ nice_agent_restart (
NiceAgent *agent)
{
GSList *i;
gboolean res = TRUE;
agent_lock();
......@@ -3705,16 +3704,16 @@ nice_agent_restart (
/* step: regenerate tie-breaker value */
priv_generate_tie_breaker (agent);
for (i = agent->streams; i && res; i = i->next) {
for (i = agent->streams; i; i = i->next) {
Stream *stream = i->data;
/* step: reset local credentials for the stream and
* clean up the list of remote candidates */
res = stream_restart (stream, agent->rng);
stream_restart (stream, agent->rng);
}
agent_unlock_and_emit (agent);
return res;
return TRUE;
}
......
......@@ -276,7 +276,7 @@ component_find_pair (Component *cmp, NiceAgent *agent, const gchar *lfoundation,
* Resets the component state to that of a ICE restarted
* session.
*/
gboolean
void
component_restart (Component *cmp)
{
GSList *i;
......@@ -307,8 +307,6 @@ component_restart (Component *cmp)
cmp->incoming_checks = NULL;
/* note: component state managed by agent */
return TRUE;
}
/*
......
......@@ -214,7 +214,7 @@ component_free (Component *cmp);
gboolean
component_find_pair (Component *cmp, NiceAgent *agent, const gchar *lfoundation, const gchar *rfoundation, CandidatePair *pair);
gboolean
void
component_restart (Component *cmp);
void
......
......@@ -132,22 +132,19 @@ void stream_initialize_credentials (Stream *stream, NiceRNG *rng)
* Resets the stream state to that of a ICE restarted
* session.
*/
gboolean
void
stream_restart (Stream *stream, NiceRNG *rng)
{
GSList *i;
gboolean res = TRUE;
stream->initial_binding_request_received = FALSE;
stream_initialize_credentials (stream, rng);
for (i = stream->components; i && res; i = i->next) {
for (i = stream->components; i; i = i->next) {
Component *component = i->data;
res = component_restart (component);
component_restart (component);
}
return res;
}
......@@ -92,7 +92,7 @@ stream_find_component_by_id (const Stream *stream, guint id);
void
stream_initialize_credentials (Stream *stream, NiceRNG *rng);
gboolean
void
stream_restart (Stream *stream, NiceRNG *rng);
G_END_DECLS
......
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