From d22547667f95fc4e1b3cfe3c17a2af7f2677c9b0 Mon Sep 17 00:00:00 2001 From: Fabrice Bellet Date: Fri, 21 Jun 2019 15:06:58 +0200 Subject: [PATCH] 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. --- agent/agent.c | 4 ++++ 1 file changed, 4 insertions(+) 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. */ -- 2.7.4