From 89666c8021aa543db2c348c260fb5d2d6bc120ec Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 16 Apr 2021 12:07:44 -0400 Subject: [PATCH] TT#14008 fix ICE if ICE completes before SDP comes in Change-Id: I3085e67a81fb8adeeb4334db2e0e894716107937 --- daemon/call.c | 1 - daemon/ice.c | 1 + include/ice.h | 2 ++ 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon/call.c b/daemon/call.c index fb0efeab7..0de526a32 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -1028,7 +1028,6 @@ static void __fill_stream(struct packet_stream *ps, const struct endpoint *epp, ilog(LOG_DEBUG, "set FILLED flag for stream %s%s:%d%s", FMT_M(sockaddr_print_buf(&ps->endpoint.address), ps->endpoint.port)); PS_SET(ps, FILLED); - /* XXX reset/repair ICE */ } /* called with call locked in R or W, but ps not locked */ diff --git a/daemon/ice.c b/daemon/ice.c index 9042d2bf4..72570b104 100644 --- a/daemon/ice.c +++ b/daemon/ice.c @@ -1035,6 +1035,7 @@ static int __check_valid(struct ice_agent *ag) { ilogs(ice, LOG_INFO, "ICE negotiated: peer for component %u is %s%s%s", ps->component, FMT_M(endpoint_print_buf(&pair->remote_candidate->endpoint))); ps->endpoint = pair->remote_candidate->endpoint; + PS_SET(ps, FILLED); } mutex_unlock(&ps->out_lock); diff --git a/include/ice.h b/include/ice.h index 108daa7cb..808ff1115 100644 --- a/include/ice.h +++ b/include/ice.h @@ -217,6 +217,8 @@ INLINE const char *ice_candidate_type_str(enum ice_candidate_type type) { return ice_type_strings[type]; } INLINE int ice_ufrag_cmp(struct ice_agent *ag, const str *s) { + if (!ag->ufrag[0].len) // fragment unknown + return 0; return str_cmp_str0(&ag->ufrag[0], s); }