From: Johan Van den Brande Date: Wed, 19 May 2010 10:23:23 +0000 (+0200) Subject: Bugfix for libcollectdclient lcc_putval. X-Git-Tag: collectd-4.9.3~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=2a0b2294b8d0064890a2687d0ce25a8ed2f428f4;p=collectd.git Bugfix for libcollectdclient lcc_putval. Hello, I'm using collectd to monitor system and process parameters of our code under test running on a cluster. The test processes communicate to collectd via the unixsock plugin, but there was a small error in the client library which I had to fix first. The wire format of the putval command is missing a space behind the closing double quote of the identifier. As I said, it is a small fix, but nevertheless I attached the patch for client.c. The bug is present in 4.6 (that is the version I'm using in production), but I fixed it against 4.10.0. Cheers, Johan Signed-off-by: Florian Forster --- diff --git a/src/libcollectdclient/client.c b/src/libcollectdclient/client.c index 63d4e9d7..0c748ba7 100644 --- a/src/libcollectdclient/client.c +++ b/src/libcollectdclient/client.c @@ -777,9 +777,9 @@ int lcc_putval (lcc_connection_t *c, const lcc_value_list_t *vl) /* {{{ */ SSTRCATF (command, " interval=%i", vl->interval); if (vl->time > 0) - SSTRCATF (command, "%u", (unsigned int) vl->time); + SSTRCATF (command, " %u", (unsigned int) vl->time); else - SSTRCAT (command, "N"); + SSTRCAT (command, " N"); for (i = 0; i < vl->values_len; i++) {