]> git.ipfire.org Git - thirdparty/ulogd2.git/commitdiff
graphite: fix crash on i386
authorEric Leblond <eric@regit.org>
Sun, 17 Feb 2013 21:59:40 +0000 (22:59 +0100)
committerEric Leblond <eric@regit.org>
Sun, 17 Feb 2013 22:04:15 +0000 (23:04 +0100)
It seems a cast of time_t is needed for i386 system to avoid a
crash. I've added a cast to uint64_t that should be ok on all
Linux system.

Reported-by: netfilter@openenterprise.co.uk
output/ulogd_output_GRAPHITE.c

index a4b31a569544f732ab182a90b703721e6686ba62..5328f8e95572a8c48f399267fb3df2b390ddc1fa 100644 (file)
@@ -164,11 +164,11 @@ static int _output_graphite(struct ulogd_pluginstance *upi)
                 prefix_ce(upi->config_kset).u.string,
                 (char *)ikey_get_ptr(&inp[KEY_SUM_NAME]),
                 ikey_get_u64(&inp[KEY_SUM_PKTS]),
-                now,
+                (uint64_t) now,
                 prefix_ce(upi->config_kset).u.string,
                 (char *)ikey_get_ptr(&inp[KEY_SUM_NAME]),
                 ikey_get_u64(&inp[KEY_SUM_BYTES]),
-                now
+                (uint64_t) now
                 );
        if (msg_size == -1) {
                ulogd_log(ULOGD_ERROR, "Could not create message\n");