MT#55283 allow null media_id

Change-Id: I2715fcf1a05c430c7eeea5c4c8f8ad7c1bc69ed0
(cherry picked from commit ba8c0fa87f)
(cherry picked from commit 96e596398b)
mr14.1.1
Richard Fuchs 2 months ago
parent 3c49c4da80
commit 28d883ea8d

@ -708,14 +708,15 @@ struct call_media *call_media_new(call_t *call) {
return med; return med;
} }
__attribute__((nonnull(1, 2, 4))) __attribute__((nonnull(1, 2)))
static struct call_media *call_get_media(struct call_monologue *ml, const str *type, enum media_type type_id, static struct call_media *call_get_media(struct call_monologue *ml, const str *type, enum media_type type_id,
const str *media_id, bool trickle_ice, unsigned int want_index, str_ht tracker) const str *media_id, bool trickle_ice, unsigned int want_index, str_ht tracker)
{ {
struct call_media *med; struct call_media *med;
call_t *call; call_t *call;
if (media_id->len && (!t_hash_table_is_set(tracker) || !t_hash_table_lookup(tracker, media_id))) { if (media_id && media_id->len
&& (!t_hash_table_is_set(tracker) || !t_hash_table_lookup(tracker, media_id))) {
if (t_hash_table_is_set(tracker)) if (t_hash_table_is_set(tracker))
t_hash_table_insert(tracker, (str *) media_id, (str *) media_id); t_hash_table_insert(tracker, (str *) media_id, (str *) media_id);
// in this case, the media sections can be out of order and the media ID // in this case, the media sections can be out of order and the media ID

Loading…
Cancel
Save