diff options
author | Fabrice Bellet <fabrice@bellet.info> | 2019-06-04 19:34:22 +0200 |
---|---|---|
committer | Olivier CrĂȘte <olivier.crete@ocrete.ca> | 2019-07-11 19:03:03 +0000 |
commit | e4d65ba719f194cd2306e63485e4198cbffff4de (patch) | |
tree | 563078dfd72c0da68644cb1daae0534743c3c2c0 /agent | |
parent | 1e40ee6d367f28dfd09f0d01cede312ca7dc7fee (diff) | |
download | libnice-e4d65ba719f194cd2306e63485e4198cbffff4de.tar.gz |
conncheck: improve comment on local peer-reflexive selection
This patch rewrites the comment surrounding this code snippet, to make it
clear, that this pair selection is not specific to the tcp transport.
Diffstat (limited to 'agent')
-rw-r--r-- | agent/conncheck.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/agent/conncheck.c b/agent/conncheck.c index 78c7ae6..ca5c516 100644 --- a/agent/conncheck.c +++ b/agent/conncheck.c @@ -3321,10 +3321,16 @@ static CandidateCheckPair *priv_process_response_check_for_reflexive(NiceAgent * if (nice_address_equal (&mapped, &cand->addr)) { local_cand = cand; - /* We always need to select the peer-reflexive Candidate Pair in the case - * of a TCP-ACTIVE local candidate, so we find it even if an incoming - * check matched an existing pair because it could be the original - * ACTIVE-PASSIVE candidate pair which was retriggered */ + /* The mapped address allows to look for a previously discovered + * peer reflexive local candidate, and its related pair. This + * new_pair will be marked 'Valid', while the pair 'p' of the + * initial stun request will be marked 'Succeeded' + * + * In the case of a tcp-act/tcp-pass pair 'p', where the local + * candidate is of type tcp-act, and its port number is zero, a + * conncheck on this pair *always* leads to the creation of a + * discovered peer-reflexive tcp-act local candidate. + */ for (i = stream->conncheck_list; i; i = i->next) { CandidateCheckPair *pair = i->data; if (pair->local == cand && remote_candidate == pair->remote) { |