From 2d18d6189b21e1c784ddbd829119f66ea1708bc0 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 --- daemon/call.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index fc160ed70..1b818b66a 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -3581,7 +3581,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; ) @@ -3594,11 +3593,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;