MT#63317 use length for empty test

Change-Id: I7d47a545f3b8abb2025ac8cf88c2b564c171b23a
rfuchs/dtls-ice
Richard Fuchs 5 months ago
parent 60a3637b20
commit 99005e01a8

@ -2306,9 +2306,9 @@ __attribute__((nonnull(1, 2)))
static void media_update_media_id(struct call_media *media, struct stream_params *sp) {
struct call_monologue *ml = media->monologue;
if (!media->media_id.s) {
if (!media->media_id.len) {
// incoming side: we copy what we received
if (sp->media_id.s)
if (sp->media_id.len)
media->media_id = call_str_cpy(&sp->media_id);
if (media->media_id.s)
t_hash_table_insert(ml->media_ids, &media->media_id,
@ -2317,7 +2317,7 @@ static void media_update_media_id(struct call_media *media, struct stream_params
else {
// RFC 5888 allows changing the media ID in a re-invite
// (section 9.1), so handle this here.
if (sp->media_id.s) {
if (sp->media_id.len) {
if (str_cmp_str(&media->media_id, &sp->media_id)) {
// mismatch - update
t_hash_table_remove(ml->media_ids, &media->media_id);

Loading…
Cancel
Save