Skip to content

Commit be66b25

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 4c498b1 commit be66b25

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
@@ -3534,7 +3534,6 @@ int monologue_unsubscribe(struct call_monologue *dst_ml, sdp_ng_flags *flags) {
35343534
continue;
35353535

35363536
__media_unconfirm(media, "media unsubscribe");
3537-
__update_init_subscribers(media, NULL, NULL, flags->opmode);
35383537

35393538
/* TODO: should we care about subscribers as well? */
35403539
for (__auto_type l = media->media_subscriptions.head; l; )
@@ -3547,11 +3546,13 @@ int monologue_unsubscribe(struct call_monologue *dst_ml, sdp_ng_flags *flags) {
35473546
continue;
35483547

35493548
__media_unconfirm(src_media, "media unsubscribe");
3550-
__update_init_subscribers(src_media, NULL, NULL, flags->opmode);
35513549
__unsubscribe_media_link(media, l);
3550+
__update_init_subscribers(src_media, NULL, NULL, flags->opmode);
35523551

35533552
l = next;
35543553
}
3554+
3555+
__update_init_subscribers(media, NULL, NULL, flags->opmode);
35553556
}
35563557

35573558
return 0;

0 commit comments

Comments
 (0)