From 5b69e419d5dd6db700447b2ebef8bb25e6c6131a Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 23 Sep 2024 09:35:04 -0400 Subject: [PATCH] MT#55283 allow rejection of first m= Fix zero c= line when first m= line has a zero port. Add matching tests. Change-Id: I1472b8101ffb3647e6aa092995672788510ee117 --- daemon/sdp.c | 4 +- t/auto-daemon-tests.pl | 106 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 109 insertions(+), 1 deletion(-) diff --git a/daemon/sdp.c b/daemon/sdp.c index 78d5312bd..c3b0b947a 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3335,7 +3335,9 @@ int sdp_replace(struct sdp_chopper *chop, sdp_sessions_q *sessions, if (!call_media->streams.head) continue; ps = call_media->streams.head->data; - break; + if (ps->selected_sfd) + break; + ps = NULL; } err = "no usable session media stream"; diff --git a/t/auto-daemon-tests.pl b/t/auto-daemon-tests.pl index df0d58b6d..b73830252 100755 --- a/t/auto-daemon-tests.pl +++ b/t/auto-daemon-tests.pl @@ -82,6 +82,112 @@ sub stun_succ { +new_call; + +offer('reject first stream, session c=', { }, <