From f1d1662d388e9784e4d718080975a609e472cd46 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 (cherry picked from commit 5b69e419d5dd6db700447b2ebef8bb25e6c6131a) (cherry picked from commit 28a2f02a0a170c7bef312034da4a63e5dd070e79) --- 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 95aeb4e41..76222e383 100644 --- a/daemon/sdp.c +++ b/daemon/sdp.c @@ -3263,7 +3263,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 ba0ca8b49..26162b0ca 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=', { }, <