Skip to content

Commit 547e0ab

Browse files
committed
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 2d18d61) (cherry picked from commit bd5f9f9) (cherry picked from commit b58e8ea)
1 parent 2f6f307 commit 547e0ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

daemon/call.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3457,7 +3457,6 @@ int monologue_unsubscribe(struct call_monologue *dst_ml, sdp_ng_flags *flags) {
34573457
continue;
34583458

34593459
__media_unconfirm(media, "media unsubscribe");
3460-
__update_init_subscribers(media, NULL, NULL, flags->opmode);
34613460

34623461
/* TODO: should we care about subscribers as well? */
34633462
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) {
34703469
continue;
34713470

34723471
__media_unconfirm(src_media, "media unsubscribe");
3473-
__update_init_subscribers(src_media, NULL, NULL, flags->opmode);
34743472
__unsubscribe_media_link(media, l);
3473+
__update_init_subscribers(src_media, NULL, NULL, flags->opmode);
34753474

34763475
l = next;
34773476
}
3477+
3478+
__update_init_subscribers(media, NULL, NULL, flags->opmode);
34783479
}
34793480

34803481
return 0;

0 commit comments

Comments
 (0)