summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabrice Bellet <fabrice@bellet.info>2019-06-21 15:06:58 +0200
committerOlivier CrĂȘte <olivier.crete@collabora.com>2019-07-04 17:03:43 -0400
commitd22547667f95fc4e1b3cfe3c17a2af7f2677c9b0 (patch)
treed09ae76891cf19b927928de60edb46751bb511ae
parent6303ed6fd7aea7ac1d1d2ab06dabaa08e233735a (diff)
downloadlibnice-d22547667f95fc4e1b3cfe3c17a2af7f2677c9b0.tar.gz
agent: discard sockptr on updated remote candidates
These candidates type is updated from peer-reflexive, discovered during early incoming checks, to the type of the matching regularly transmitted candidate, so the previous sockptr value is no longer of interest here. The same socket is already associated to the initial local candidate anyway, source of the early discovery.
-rw-r--r--agent/agent.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/agent/agent.c b/agent/agent.c
index ff570c1..14d163b 100644
--- a/agent/agent.c
+++ b/agent/agent.c
@@ -3455,6 +3455,10 @@ static gboolean priv_add_remote_candidate (
nice_debug ("Agent %p : Updating existing peer-rfx remote candidate to %s",
agent, _cand_type_to_sdp (type));
candidate->type = type;
+ /* The updated candidate is no more peer reflexive, so its
+ * sockptr can be cleared
+ */
+ candidate->sockptr = NULL;
/* If it got there, the next one will also be ran, so the foundation
* will be set.
*/