[collectd] [PATCH] src/csv.c: use a bigger buffer

Colin McCabe cmccabe at alumni.cmu.edu
Wed Jul 27 19:00:30 CEST 2011


From: Colin Patrick McCabe <cmccabe at alumni.cmu.edu>

The CSV plugin formerly used a relatively small output buffer. If you
had a large dataset, you would always get error -1 because the line
length was be too long. This patch extends the buffer.

Signed-off-by: Colin McCabe <colin.mccabe at dreamhost.com>
---
 src/csv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/csv.c b/src/csv.c
index 87a7b4e..02d62c1 100644
--- a/src/csv.c
+++ b/src/csv.c
@@ -264,7 +264,7 @@ static int csv_write (const data_set_t *ds, const value_list_t *vl,
 {
 	struct stat  statbuf;
 	char         filename[512];
-	char         values[512];
+	char         values[4096];
 	FILE        *csv;
 	int          csv_fd;
 	struct flock fl;
-- 
1.7.2.5




More information about the collectd mailing list