mirror of https://gerrit.osmocom.org/libosmocore
statsd report: Fix wrong fmt specificier generating wrong stats
Fixes: OS#4871 Change-Id: I04aba0f3a4ff6563a4e285b982077184645d1180
This commit is contained in:
parent
920491936e
commit
3f2775b4d2
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <inttypes.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include <osmocom/core/utils.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 (prefix) {
|
||||||
if (name1)
|
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
|
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 {
|
} else {
|
||||||
prefix = "";
|
prefix = "";
|
||||||
if (name1)
|
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
|
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) {
|
if (srep->agg_enabled) {
|
||||||
|
|
Loading…
Reference in New Issue