MT#61263 fix `delete` stats reporting

Make sure stats are always added to the `delete` message.

Fixes stats being missing in case of `delete` without from-tag.

Change-Id: I635cc87b91d3e488696f33380b12dc68a24e51ad
(cherry picked from commit 7b28ec4402)
mr13.0
Richard Fuchs 2 years ago
parent 63037b2be0
commit 71652689af

@ -4872,9 +4872,6 @@ int call_delete_branch(call_t *c, const str *branch,
do_delete:
c->destroyed = rtpe_now;
if (ctx)
ng_call_stats(ctx, c, fromtag, totag, NULL);
/* stop media player and all medias of ml.
* same for media subscribers */
monologue_stop(ml, true);
@ -4892,9 +4889,15 @@ do_delete:
if (!del_stop)
goto del_all;
if (ctx)
ng_call_stats(ctx, c, fromtag, totag, NULL);
goto success_unlock;
del_all:
if (ctx)
ng_call_stats(ctx, c, NULL, NULL, NULL);
for (__auto_type i = c->monologues.head; i; i = i->next) {
ml = i->data;
monologue_stop(ml, false);

Loading…
Cancel
Save