X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Flibcollectdclient%2Fclient.c;h=20015be9dff4faa9e71152b1d1a9eed21e12230c;hb=79d834024d69d3b33e0fc4717b6560385b54cdd1;hp=850edaaff45841d82c1a7536258e26a74d9229a1;hpb=dff1246579ac6bea70331e560d2e1da0c7429b11;p=collectd.git diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index 850edaaf..20015be9 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -84,7 +84,7 @@ _b[sizeof (_b) - 1] = 0; \ SSTRCAT ((d), _b); \ } while (0) - + #define LCC_SET_ERRSTR(c, ...) do { \ snprintf ((c)->errbuf, sizeof ((c)->errbuf), __VA_ARGS__); \ @@ -767,11 +767,11 @@ int lcc_putval (lcc_connection_t *c, const lcc_value_list_t *vl) /* {{{ */ SSTRCATF (command, "PUTVAL %s", lcc_strescape (ident_esc, ident_str, sizeof (ident_esc))); - if (vl->interval > 0) - SSTRCATF (command, " interval=%i", vl->interval); + if (vl->interval > 0.0) + SSTRCATF (command, " interval=%.3f", vl->interval); - if (vl->time > 0) - SSTRCATF (command, " %u", (unsigned int) vl->time); + if (vl->time > 0.0) + SSTRCATF (command, " %.3f", vl->time); else SSTRCAT (command, " N");