Commit b5dd5e2a authored by Fabrice Bellet's avatar Fabrice Bellet Committed by Olivier Crête

conncheck: the conncheck send function may fail

With this patch, we put the pair in state failed if we cannot send
the connection check, for example due to missing local credentials.
Reviewed-by: Olivier Crête's avatarOlivier Crête <olivier.crete@collabora.com>
Differential Revision: https://phabricator.freedesktop.org/D1891
parent 025d84b5
......@@ -442,7 +442,11 @@ static gboolean priv_conn_check_initiate (NiceAgent *agent, CandidateCheckPair *
{
pair->state = NICE_CHECK_IN_PROGRESS;
nice_debug ("Agent %p : pair %p state IN_PROGRESS", agent, pair);
conn_check_send (agent, pair);
if (conn_check_send (agent, pair)) {
pair->state = NICE_CHECK_FAILED;
nice_debug ("Agent %p : pair %p state FAILED", agent, pair);
return FALSE;
}
return TRUE;
}
......@@ -1070,7 +1074,11 @@ static gboolean priv_conn_check_tick_unlocked (NiceAgent *agent)
if (pair) {
priv_print_conn_check_lists (agent, G_STRFUNC,
", got a pair from triggered check list");
conn_check_send (agent, pair);
if (conn_check_send (agent, pair)) {
pair->state = NICE_CHECK_FAILED;
nice_debug ("Agent %p : pair %p state FAILED", agent, pair);
return FALSE;
}
return TRUE;
}
......
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