X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Flibcollectdclient%2Fclient.c;h=63d4e9d7cd75bf9d6a7652d7241559183fa98e39;hb=24da3d76a4c00bb5fa15068aa4e5fc114b1d5a02;hp=24c989e9c4d3763dd0f51e81ca7ee231e46b9ddf;hpb=d2c4cb59b2b8a52d613e5caac090736d02e90dbf;p=collectd.git diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index 24c989e9..63d4e9d7 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -23,11 +23,6 @@ # include "config.h" #endif -/* Set to C99 and POSIX code */ -#if COLLECT_STANDARDS -# include "standards.h" -#endif /* COLLECT_STANDARDS */ - #if !defined(__GNUC__) || !__GNUC__ # define __attribute__(x) /**/ #endif @@ -126,7 +121,7 @@ static char *sstrerror (int errnum, char *buf, size_t buflen) buf[0] = 0; #if !HAVE_STRERROR_R - snprintf (buf, buflen "Error #%i; strerror_r is not available.", errnum); + snprintf (buf, buflen, "Error #%i; strerror_r is not available.", errnum); /* #endif !HAVE_STRERROR_R */ #elif STRERROR_R_CHAR_P @@ -797,6 +792,11 @@ int lcc_putval (lcc_connection_t *c, const lcc_value_list_t *vl) /* {{{ */ else SSTRCATF (command, ":%g", vl->values[i].gauge); } + else if (vl->values_types[i] == LCC_TYPE_DERIVE) + SSTRCATF (command, ":%"PRIu64, vl->values[i].derive); + else if (vl->values_types[i] == LCC_TYPE_ABSOLUTE) + SSTRCATF (command, ":%"PRIu64, vl->values[i].absolute); + } /* for (i = 0; i < vl->values_len; i++) */ status = lcc_sendreceive (c, command, &res);