Browse Source

MT#58535 rtpp_flags: parse key/val flags directly

Instead of adding key/val flags to the dictionary for
further parsing later via iteration in `call_ng_main_flags()`,
just call the `call_ng_main_flags()` directly.

Change-Id: Ia893a6b50db7a0659a42c09463169f2c0f5e595e
pull/1819/head
Donat Zenichev 2 years ago
parent
commit
1e65172b52
3 changed files with 5 additions and 2 deletions
  1. +1
    -1
      daemon/call_interfaces.c
  2. +2
    -1
      daemon/control_ng_flags_parser.c
  3. +2
    -0
      include/call_interfaces.h

+ 1
- 1
daemon/call_interfaces.c View File

@ -1393,7 +1393,7 @@ static void call_ng_flags_freqs(sdp_ng_flags *out, bencode_item_t *value) {
} }
} }
static void call_ng_main_flags(sdp_ng_flags *out, str *key, bencode_item_t *value,
void call_ng_main_flags(sdp_ng_flags *out, str *key, bencode_item_t *value,
enum call_opmode opmode) enum call_opmode opmode)
{ {
str s = STR_NULL; str s = STR_NULL;


+ 2
- 1
daemon/control_ng_flags_parser.c View File

@ -460,7 +460,8 @@ generic:
call_ng_flags_flags(out, &key, NULL); call_ng_flags_flags(out, &key, NULL);
/* generic flags with value, but no particular processing */ /* generic flags with value, but no particular processing */
else else
bencode_dictionary_str_add_str(root_dict, &key, &val);
call_ng_main_flags(out, &key, bencode_str(buf, &val), opmode);
next: next:
start = eptr; start = eptr;
} }


+ 2
- 0
include/call_interfaces.h View File

@ -287,6 +287,8 @@ void call_interfaces_free(void);
void call_interfaces_timer(void); void call_interfaces_timer(void);
void call_ng_flags_flags(sdp_ng_flags *out, str *s, helper_arg dummy); void call_ng_flags_flags(sdp_ng_flags *out, str *s, helper_arg dummy);
void call_ng_main_flags(sdp_ng_flags *out, str *key, bencode_item_t *value,
enum call_opmode opmode);
INLINE struct sdp_manipulations *sdp_manipulations_get_by_id(const sdp_ng_flags *f, enum media_type id) { INLINE struct sdp_manipulations *sdp_manipulations_get_by_id(const sdp_ng_flags *f, enum media_type id) {
if (id < 0 || id >= G_N_ELEMENTS(f->sdp_manipulations)) if (id < 0 || id >= G_N_ELEMENTS(f->sdp_manipulations))


Loading…
Cancel
Save