Browse Source

MT#55283 fix sdes_accept logic booboo

Using `l->next` as a test for whether only one element is left in the
list is not reliable. Use the actual list length instead.

Update one affected test.

Closes #1961

Change-Id: I5773715700220cd762e61090bac941ddd33afd9b
(cherry picked from commit 02897ccb46)
(cherry picked from commit 5b97378063)
mr11.5.1
Richard Fuchs 6 months ago
parent
commit
ab02931d76
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      daemon/call.c

+ 1
- 3
daemon/call.c View File

@ -1866,10 +1866,8 @@ static void __sdes_accept(struct call_media *media, const struct sdp_ng_flags *f
/* 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 (g_list_length(l) == 1) {
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,


Loading…
Cancel
Save