From af37022b90274d54ee4f0f49340096778da2b6e3 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 10 Jan 2023 12:19:17 -0500 Subject: [PATCH] MT#55283 split up __fingerprint_changed() Change-Id: I7e0720aa422b343f6f796f83ea7215c70ed01373 --- daemon/call.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 84e65183a..603069411 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2146,15 +2146,10 @@ static void __rtcp_mux_logic(struct sdp_ng_flags *flags, struct call_media *medi } } -static void __fingerprint_changed(struct call_media *m) { +static void __dtls_restart(struct call_media *m) { GList *l; struct packet_stream *ps; - if (!m->fingerprint.hash_func || !m->fingerprint.digest_len) - return; - - ilogs(crypto, LOG_INFO, "DTLS fingerprint changed, restarting DTLS"); - for (l = m->streams.head; l; l = l->next) { ps = l->data; PS_CLEAR(ps, FINGERPRINT_VERIFIED); @@ -2163,6 +2158,14 @@ static void __fingerprint_changed(struct call_media *m) { } } +static void __fingerprint_changed(struct call_media *m) { + if (!m->fingerprint.hash_func || !m->fingerprint.digest_len) + return; + + ilogs(crypto, LOG_INFO, "DTLS fingerprint changed, restarting DTLS"); + __dtls_restart(m); +} + static void __set_all_tos(struct call *c) { GList *l; struct stream_fd *sfd;