diff --git a/daemon/call.c b/daemon/call.c index c73771f33..0044f70c2 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2002,10 +2002,8 @@ static void __sdes_accept(struct call_media *media, const sdp_ng_flags *flags) { /* stop the iteration intentionally, if only one suite is left * this helps with a case, when the offerer left with no suites, * which can be allowed, but we need to still have at least something */ - if (l->next == NULL) { - l = l->prev; + if (media->sdes_in.length == 1) break; - } ilogs(crypto, LOG_DEBUG, "Dropping offered crypto suite '%s' from offer due to %s", offered_cps->params.crypto_suite->name, diff --git a/t/auto-daemon-tests-sdes-manipulations.pl b/t/auto-daemon-tests-sdes-manipulations.pl index 82cc1992d..13736983e 100644 --- a/t/auto-daemon-tests-sdes-manipulations.pl +++ b/t/auto-daemon-tests-sdes-manipulations.pl @@ -1418,7 +1418,7 @@ c=IN IP4 203.0.113.1 a=rtpmap:0 PCMU/8000 a=sendrecv a=rtcp:PORT -a=crypto:4 AES_256_CM_HMAC_SHA1_32 inline:CRYPTO256 +a=crypto:3 AES_256_CM_HMAC_SHA1_80 inline:CRYPTO256 SDP