diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2016-06-14 21:04:49 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@collabora.com> | 2017-06-21 16:05:57 -0400 |
commit | 6a512b6eca9603ce8bf3ed0814fd314684c66ea7 (patch) | |
tree | 8e046545f4b1d9afe38be6d16afd454a4e9f17dd | |
parent | 8fa648a15a6700d08165fe97a09f5c068abae1e6 (diff) | |
download | libnice-6a512b6eca9603ce8bf3ed0814fd314684c66ea7.tar.gz |
conncheck: try to change earlier to state ready
We check if we can move from state connected to ready just
after a pair expired its retransmission count. This pair
will be marked failed, and will no longer be in-progress.
The number of in-progress dropping down to zero is one
of the conditions needed to make the transition to ready,
per component (and not globally as it's the case in other
locations where this check function is called).
Differential Revision: https://phabricator.freedesktop.org/D1117
-rw-r--r-- | agent/conncheck.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c index 79f678a..d31b77f 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -626,6 +626,7 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen case STUN_USAGE_TIMER_RETURN_TIMEOUT: { gchar tmpbuf1[INET6_ADDRSTRLEN], tmpbuf2[INET6_ADDRSTRLEN]; + NiceComponent *component; /* case: conncheck cancelled due to in-progress incoming * check, requeing the pair, ICE spec, sect 7.2.1.4 @@ -646,6 +647,16 @@ static gboolean priv_conn_check_tick_stream (NiceStream *stream, NiceAgent *agen priv_print_conn_check_lists (agent, G_STRFUNC, ", retransmission failed"); + /* perform a check if a transition state from connected to + * ready can be performed. This may happen here, when the last + * in-progress pair has expired its retransmission count + * in priv_conn_check_tick_stream(), which is a condition to + * make the transition connected to ready. + */ + if (agent_find_component (agent, p->stream_id, p->component_id, + NULL, &component)) + priv_update_check_list_state_for_ready (agent, stream, + component); break; } case STUN_USAGE_TIMER_RETURN_RETRANSMIT: |