From fe0440c3cdfc628ee6db409d027da259c9d174a5 Mon Sep 17 00:00:00 2001 From: Stefan Mititelu Date: Thu, 9 Sep 2021 11:09:42 +0300 Subject: [PATCH] TT#14008 Fix graphite deadlock closes #1346 closes #1345 Change-Id: I47e65ca2c9bd0ba23ef740edfa46b65f3aeda62c (cherry picked from commit db53dd683a6613b6bba0041809b43e2df71b2def) --- daemon/call.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/daemon/call.c b/daemon/call.c index 24c115b9d..e5ff8afab 100644 --- a/daemon/call.c +++ b/daemon/call.c @@ -2998,7 +2998,7 @@ static struct timeval add_ongoing_calls_dur_in_interval(struct timeval *interval ITERATE_CALL_LIST_START(CALL_ITERATOR_GRAPHITE, call); if (!call->monologues.head || IS_FOREIGN_CALL(call)) - continue; + goto next; ml = call->monologues.head->data; if (timercmp(interval_start, &ml->started, >)) { timeval_add(&res, &res, interval_duration); @@ -3006,7 +3006,8 @@ static struct timeval add_ongoing_calls_dur_in_interval(struct timeval *interval timeval_subtract(&call_duration, &rtpe_now, &ml->started); timeval_add(&res, &res, &call_duration); } - +next: + ; ITERATE_CALL_LIST_NEXT_END(call); return res;