From 1095440616c5ec029a16a89e78b307bedfe99cc9 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Thu, 18 Jun 2020 14:14:48 -0400 Subject: [PATCH] TT#82410 fix missing comma for JSON list of objects Change-Id: I70f022406ad88939534d4b42f291490f461ae8d5 --- daemon/statistics.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/daemon/statistics.c b/daemon/statistics.c index 9f3aa0ff1..4ed99463f 100644 --- a/daemon/statistics.c +++ b/daemon/statistics.c @@ -232,11 +232,15 @@ void statistics_update_oneway(struct call* c) { #define SM_PUSH(ret, m) \ do { \ - if (!m->is_bracket && ret->tail) { \ - struct stats_metric *last = ret->tail->data; \ + struct stats_metric *last = NULL; \ + if (ret->tail) \ + last = ret->tail->data; \ + if (!m->is_bracket && last) { \ if (!last->is_bracket || last->is_close_bracket) \ m->is_follow_up = 1; \ } \ + else if (m->is_bracket && !m->is_close_bracket && last && last->is_close_bracket) \ + m->is_follow_up = 1; \ g_queue_push_tail(ret, m); \ } while (0)