Browse Source

MT#60476 treat force_inc_sdp_ver independently

Don't treat the `force_inc_sdp_ver` flag as
the `replace_sdp_version` one, but consider
it as a separate option flag.

Correct usage of it accordingly.

Additionally: change sdp_version_check() func signature
to use `force_increase` as bool.

Change-Id: I9ed772a5a3535d887dda5a5a116b6326c8f5f46a
pull/1848/head
Donat Zenichev 1 year ago
parent
commit
c6b903d519
2 changed files with 3 additions and 4 deletions
  1. +0
    -1
      daemon/call_interfaces.c
  2. +3
    -3
      daemon/sdp.c

+ 0
- 1
daemon/call_interfaces.c View File

@ -842,7 +842,6 @@ static void call_ng_flags_replace(sdp_ng_flags *out, str *s, helper_arg arg) {
switch (__csh_lookup(s)) { switch (__csh_lookup(s)) {
case CSH_LOOKUP("force-increment-sdp-ver"): case CSH_LOOKUP("force-increment-sdp-ver"):
out->force_inc_sdp_ver = 1; out->force_inc_sdp_ver = 1;
out->replace_sdp_version = 1;
break; break;
case CSH_LOOKUP("origin"): case CSH_LOOKUP("origin"):
out->replace_origin = 1; out->replace_origin = 1;


+ 3
- 3
daemon/sdp.c View File

@ -2919,7 +2919,7 @@ static void sdp_version_replace(struct sdp_chopper *chop, sdp_sessions_q *sessio
static void sdp_version_check(struct sdp_chopper *chop, sdp_sessions_q *sessions, static void sdp_version_check(struct sdp_chopper *chop, sdp_sessions_q *sessions,
struct call_monologue *monologue, struct call_monologue *monologue,
unsigned int force_increase)
bool force_increase)
{ {
/* We really expect only a single session here, but we treat all the same regardless, /* We really expect only a single session here, but we treat all the same regardless,
* and use the same version number on all of them */ * and use the same version number on all of them */
@ -3441,8 +3441,8 @@ int sdp_replace(struct sdp_chopper *chop, sdp_sessions_q *sessions,
* - if the force_inc_sdp_ver (force-increment-sdp-ver) flag is set additionally to replace_sdp_version, * - if the force_inc_sdp_ver (force-increment-sdp-ver) flag is set additionally to replace_sdp_version,
* which forces version increase regardless changes in the SDP information. * which forces version increase regardless changes in the SDP information.
*/ */
if (flags->replace_sdp_version || flags->replace_origin_full)
sdp_version_check(chop, sessions, monologue, flags->force_inc_sdp_ver);
if (flags->force_inc_sdp_ver || flags->replace_sdp_version || flags->replace_origin_full)
sdp_version_check(chop, sessions, monologue, !!flags->force_inc_sdp_ver);
return 0; return 0;


Loading…
Cancel
Save