agent: discard sockptr on updated remote candidates
authorFabrice Bellet <fabrice@bellet.info>
Fri, 21 Jun 2019 13:06:58 +0000 (15:06 +0200)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Thu, 4 Jul 2019 21:03:43 +0000 (17:03 -0400)
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

index ff570c1..14d163b 100644 (file)
@@ -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.
      */