From fefe5190c957d7bd5d3b545cef3489e93ecabb62 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 3 Nov 2025 10:03:37 -0400 Subject: [PATCH] MT#55283 rtpengine: always set "flags" Processing a trickle ICE SDP fragment requires the "flags" list to be present, regardless of how other flags are being processed or if other flags are even set at all. Create the "flags" list unconditionally as it's a cheap operation and eliminates a few case distinctions in the code. Change-Id: I6e8278b38a869202206e973d06c4a1587db482f5 --- debian/patches/series | 1 + debian/patches/sipwise/rtpengine-flags.patch | 43 ++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 debian/patches/sipwise/rtpengine-flags.patch diff --git a/debian/patches/series b/debian/patches/series index d86ada50f..091fb6622 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -42,6 +42,7 @@ sipwise/http_client-add-method-parameter-to-http_connect.patch sipwise/lost-add-method-parameter-to-http_connect-calls.patch sipwise/usrloc-don-t-synchronize-on-destroy-for-DB_ONLY.patch sipwise/presence_offline_cleanup.patch +sipwise/rtpengine-flags.patch ### active development sipwise/permissions-don-t-allow-reloads-in-the-middle-of-ong.patch sipwise/dlg_get_var_error_more_verbose_on_dlg diff --git a/debian/patches/sipwise/rtpengine-flags.patch b/debian/patches/sipwise/rtpengine-flags.patch new file mode 100644 index 000000000..1dc3e4549 --- /dev/null +++ b/debian/patches/sipwise/rtpengine-flags.patch @@ -0,0 +1,43 @@ +--- a/src/modules/rtpengine/rtpengine.c ++++ b/src/modules/rtpengine/rtpengine.c +@@ -3354,9 +3354,6 @@ + /* initialize some basic bencode items */ + if(!extra_dict) { + ng_flags.dict = bencode_dictionary(bencbuf); +- if(parse_by_module) { +- ng_flags.flags = bencode_list(bencbuf); +- } + } else { + ng_flags.dict = extra_dict; + ng_flags.flags = bencode_dictionary_get(ng_flags.dict, "flags"); +@@ -3366,6 +3363,9 @@ + } + } + ++ if (!ng_flags.flags) ++ ng_flags.flags = bencode_list(bencbuf); ++ + if(parse_by_module) { + ng_flags.received_from = bencode_list(bencbuf); + } +@@ -3440,9 +3440,6 @@ + if(ng_flags.direction && ng_flags.direction->child) + bencode_dictionary_add( + ng_flags.dict, "direction", ng_flags.direction); +- /* flags */ +- if(ng_flags.flags && ng_flags.flags->child) +- bencode_dictionary_add(ng_flags.dict, "flags", ng_flags.flags); + /* replace */ + if(ng_flags.replace && ng_flags.replace->child) + bencode_dictionary_add(ng_flags.dict, "replace", ng_flags.replace); +@@ -3522,6 +3519,10 @@ + sip_type_strings[msg->first_line.type]); + } + ++ /* flags */ ++ if(ng_flags.flags && ng_flags.flags->child) ++ bencode_dictionary_add(ng_flags.dict, "flags", ng_flags.flags); ++ + /* add rtpp flags, if parsed by daemon */ + if(!parse_by_module && flags) + bencode_dictionary_add_str(ng_flags.dict, "rtpp-flags", flags);