aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stats.c')
-rw-r--r--src/stats.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/stats.c b/src/stats.c
index 411ecff9..f06515dd 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -715,6 +715,11 @@ static int osmo_stat_item_handler(
if (!have_value) {
/* Send the last value in case a flush is requested */
value = osmo_stat_item_get_last(item);
+
+ /* Also send it in case a different max value was sent
+ * previously (OS#5215) */
+ if (!item->stats_last_sent_was_max)
+ have_value = 1;
} else {
int32_t next_val;
/* If we have multiple values only send the max */
@@ -722,6 +727,8 @@ static int osmo_stat_item_handler(
value = OSMO_MAX(value, next_val);
}
+ item->stats_last_sent_was_max = (osmo_stat_item_get_last(item) == value);
+
llist_for_each_entry(srep, &osmo_stats_reporter_list, list) {
if (!srep->running)
continue;