From 1a1eaab50be55b44db000dba6748e199e8007a8e Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 16 Dec 2024 09:46:36 -0400 Subject: [PATCH] MT#60476 fix advertised_address not being honoured Fixes regression from the SDP printing rework. Fixes #1885 (We should add tests for this...) Change-Id: I2154cd61fbe4a0c9bf63a25128f038068acffa0a --- daemon/sdp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 5292b61bc..958699212 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3022,8 +3022,10 @@ static struct call_media *sdp_out_set_source_media_address(struct call_media *me { struct call_media *source_media = NULL; /* the port and address that goes into the SDP also depends on this */ - if (rtp_ps->selected_sfd) - *sdp_address = rtp_ps->selected_sfd->socket.local; + if (rtp_ps->selected_sfd) { + sdp_address->port = rtp_ps->selected_sfd->socket.local.port; + sdp_address->address = rtp_ps->selected_sfd->local_intf->advertised_address.addr; + } struct media_subscription *ms = call_media_get_top_ms(media); if (ms && ms->media) {