From 06d1ceebdd862ac8f47b9f012b8c24eb8248515b Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Mon, 26 Aug 2024 08:50:38 -0400 Subject: [PATCH] MT#55283 fix unsubscribe/update order The subscriptions must be removed first and the update function must be called second. Otherwise unsubscribe doesn't have any immediate effect. Closes #1851 Change-Id: Iccc449357f7136b863ba2d633b24942dbe87d767 (cherry picked from commit 2d18d6189b21e1c784ddbd829119f66ea1708bc0) (cherry picked from commit bd5f9f9f0fde346a6b7025c8c69bbcc30c100299) (cherry picked from commit b58e8ea1ee92f099223d896d6de9802b19f38250) (cherry picked from commit 547e0ab9fdcb7ce5ef8fc3b3106ca6bee045129e) --- daemon/call.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 70944a75d..814fdf528 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3457,7 +3457,6 @@ int monologue_unsubscribe(struct call_monologue *dst_ml, sdp_ng_flags *flags) { continue; __media_unconfirm(media, "media unsubscribe"); - __update_init_subscribers(media, NULL, NULL, flags->opmode); /* TODO: should we care about subscribers as well? */ for (__auto_type l = media->media_subscriptions.head; l; ) @@ -3470,11 +3469,13 @@ int monologue_unsubscribe(struct call_monologue *dst_ml, sdp_ng_flags *flags) { continue; __media_unconfirm(src_media, "media unsubscribe"); - __update_init_subscribers(src_media, NULL, NULL, flags->opmode); __unsubscribe_media_link(media, l); + __update_init_subscribers(src_media, NULL, NULL, flags->opmode); l = next; } + + __update_init_subscribers(media, NULL, NULL, flags->opmode); } return 0;