MT#55283 set media label only for out direction

Change-Id: I316ebc34f51adf56d3df715c910e3102ab6e4a86
(cherry picked from commit 0f7774dbfa)
mr14.1
Richard Fuchs 2 months ago
parent c5e409ff47
commit 6ef9aab8df

@ -2849,20 +2849,17 @@ static void __call_monologue_init_from_flags(struct call_monologue *ml, struct c
}
__attribute__((nonnull(1, 2)))
static void media_set_siprec_label(struct call_media *other_media, struct call_media *media,
sdp_ng_flags *flags)
static void media_set_siprec_label(struct call_media *media, sdp_ng_flags *flags, unsigned int id)
{
if (!flags->siprec)
return;
if (!media->label.len) {
char buf[64];
snprintf(buf, sizeof(buf), "%u", other_media->unique_id);
media->label = call_str_cpy_c(buf);
}
// put same label on both sides
if (!other_media->label.len)
other_media->label = media->label;
if (media->label.len)
return;
char buf[64];
snprintf(buf, sizeof(buf), "%u", id);
media->label = call_str_cpy_c(buf);
}
__attribute__((nonnull(1)))
@ -4435,7 +4432,7 @@ static int monologue_subscribe_request1(struct call_monologue *src_ml, struct ca
media_init_from_flags(dst_media, flags);
media_set_echo(src_media, flags);
media_set_echo_reverse(dst_media, flags);
media_set_siprec_label(src_media, dst_media, flags);
media_set_siprec_label(dst_media, flags, src_media->unique_id);
media_update_type(dst_media, sp);
media_set_protocol(dst_media, src_media, sp, flags);
media_gen_media_id(dst_media, flags);

@ -509,7 +509,7 @@ struct call_media {
const struct extmap_ops *extmap_ops;
str media_id;
str label;
str label; // outgoing a=label:
struct call_media *bundle;
pt_media_ht pt_media;
sdes_q sdes_in, sdes_out;

Loading…
Cancel
Save