From 2a0b2294b8d0064890a2687d0ce25a8ed2f428f4 Mon Sep 17 00:00:00 2001 From: Johan Van den Brande Date: Wed, 19 May 2010 12:23:23 +0200 Subject: [PATCH] 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 --- src/libcollectdclient/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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++) { -- 2.11.0