Browse Source

MT#58441 Improve attribute level appends

Improve attribute level append functions:
- `append_attr_to_gstring()`
- `append_attr_int_to_gstring()`

Add a check against `sdp_manipulations_subst()`
additionally to already existing `sdp_manipulate_remove()`.

Change-Id: I8f1a68c3cdadffe5f43fa02373c5fba5c89dc239
pull/1747/head
Donat Zenichev 2 years ago
parent
commit
1725c92cb1
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      daemon/sdp.c

+ 8
- 4
daemon/sdp.c View File

@ -2830,8 +2830,10 @@ static void append_attr_to_gstring(GString *s, char * name, const str * value,
str attr = STR_INIT(name);
struct sdp_manipulations *sdp_manipulations = sdp_manipulations_get_by_id(flags, media_type);
/* take into account SDP arbitrary manipulations */
if (sdp_manipulate_remove(sdp_manipulations, &attr)) {
ilog(LOG_DEBUG, "Cannot insert: '%s' because prevented by SDP manipulations", name);
if (sdp_manipulate_remove(sdp_manipulations, &attr) ||
sdp_manipulations_subst(sdp_manipulations, &attr))
{
ilog(LOG_DEBUG, "Cannot insert: '%s' because prevented by SDP manipulations (remove or subst)", name);
return;
}
/* attr name */
@ -2853,8 +2855,10 @@ static void append_attr_int_to_gstring(GString *s, char * name, const int * valu
str attr = STR_INIT(name);
struct sdp_manipulations *sdp_manipulations = sdp_manipulations_get_by_id(flags, media_type);
/* take into account SDP arbitrary manipulations */
if (sdp_manipulate_remove(sdp_manipulations, &attr)) {
ilog(LOG_DEBUG, "Cannot insert: '%s' because prevented by SDP manipulations", name);
if (sdp_manipulate_remove(sdp_manipulations, &attr) ||
sdp_manipulations_subst(sdp_manipulations, &attr))
{
ilog(LOG_DEBUG, "Cannot insert: '%s' because prevented by SDP manipulations (remove or subst)", name);
return;
}
/* attr name */


Loading…
Cancel
Save