aboutsummaryrefslogtreecommitdiffstats
path: root/src/stats_statsd.c
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-11-28 01:03:56 +0100
committerPau Espin Pedrol <pespin@sysmocom.de>2020-11-28 01:11:25 +0100
commit3f2775b4d20450a45cc92da71a157c27d6a7a692 (patch)
tree25c4cafe1690d00e0e9582ad180759fedd36745c /src/stats_statsd.c
parent920491936e1d4636d55c44d2faaad4bb06de27ee (diff)
statsd report: Fix wrong fmt specificier generating wrong stats
Diffstat (limited to 'src/stats_statsd.c')
-rw-r--r--src/stats_statsd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/stats_statsd.c b/src/stats_statsd.c
index d4496677..99764e64 100644
--- a/src/stats_statsd.c
+++ b/src/stats_statsd.c
@@ -32,6 +32,7 @@
#include <string.h>
#include <stdint.h>
+#include <inttypes.h>
#include <errno.h>
#include <osmocom/core/utils.h>
@@ -100,15 +101,15 @@ static int osmo_stats_reporter_statsd_send(struct osmo_stats_reporter *srep,
if (prefix) {
if (name1)
- fmt = "%1$s.%2$s.%6$u.%3$s:%4$d|%5$s";
+ fmt = "%1$s.%2$s.%6$u.%3$s:%4$" PRId64 "|%5$s";
else
- fmt = "%1$s.%2$0.0s%3$s:%4$d|%5$s";
+ fmt = "%1$s.%2$0.0s%3$s:%4$" PRId64 "|%5$s";
} else {
prefix = "";
if (name1)
- fmt = "%1$s%2$s.%6$u.%3$s:%4$d|%5$s";
+ fmt = "%1$s%2$s.%6$u.%3$s:%4$" PRId64 "|%5$s";
else
- fmt = "%1$s%2$0.0s%3$s:%4$d|%5$s";
+ fmt = "%1$s%2$0.0s%3$s:%4$" PRId64 "|%5$s";
}
if (srep->agg_enabled) {