From 392d470501a5d84d9e5f9303548b4595b8d80aca Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 23 Feb 2022 10:12:30 -0500 Subject: [PATCH] TT#14008 always initially fill endpoint address Change-Id: Ia1cb9ede30158e1f84eece09438acec266f0a1a4 (cherry picked from commit 62c0ff54ae9e03d69bb6a8ddd63a66ca6d93baef) --- daemon/call.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index 46871757a..0cbb4ec2f 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1038,7 +1038,9 @@ static void __fill_stream(struct packet_stream *ps, const struct endpoint *epp, return; if (!MEDIA_ISSET(media, ICE)) { - if (ps->selected_sfd && ep.address.family != ps->selected_sfd->socket.family) { + if (PS_ISSET(ps, FILLED) && ps->selected_sfd + && ep.address.family != ps->selected_sfd->socket.family) + { ilog(LOG_WARN, "Ignoring updated remote endpoint %s%s%s as the local " "socket is %s", FMT_M(endpoint_print_buf(&ep)), ps->selected_sfd->socket.family->name); @@ -1053,6 +1055,11 @@ static void __fill_stream(struct packet_stream *ps, const struct endpoint *epp, dtls_shutdown(ps); } } + else { + // ICE + if (!PS_ISSET(ps, FILLED)) + ps->endpoint = ep; + } ilog(LOG_DEBUG, "set FILLED flag for stream, remote %s%s%s", FMT_M(endpoint_print_buf(&ps->endpoint)));