From e1cf7b70dcc1c19c5ccda4aebd22db59c1fc26f8 Mon Sep 17 00:00:00 2001 From: Donat Zenichev <dzenichev@sipwise.com> Date: Mon, 16 Sep 2024 15:02:04 +0200 Subject: [PATCH] MT#60476 Update media's protocol_str when initializing When initializing a media for the other side (while processing an offer), keep not only the `->protocol` updated, but also the `->protocol_str`, so that this can be usable while preparing an SDP for it. Change-Id: I209b9048fae836903c9165c6b87682a06e77a744 --- daemon/call.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/daemon/call.c b/daemon/call.c index 46540c7ad..14df7c8b0 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2376,6 +2376,9 @@ static void __update_media_protocol(struct call_media *media, struct call_media if (media && !media->protocol) media->protocol = other_media->protocol; + if (media && !media->protocol_str.s) + call_str_cpy(other_media->call, &media->protocol_str, &other_media->protocol_str); + // handler overrides requested by the user /* allow override of outgoing protocol even if we know it already */