From bee3a96910d1a0025e74dc2e584b0c4a20635446 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 16 Jan 2013 13:18:32 +0100 Subject: [PATCH] write_graphite: Decrease a buffer size. If the buffer is too large, it is possible that the message cannot be send using the send buffer, leading to a failed assertion in wg_send_message(). Fixes Github issue #226. Thanks to @bwhaley for reporting this. --- src/write_graphite.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write_graphite.c b/src/write_graphite.c index 2ae30efe..4eb0025e 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -340,7 +340,7 @@ static int wg_send_message (char const *message, struct wg_callback *cb) static int wg_write_messages (const data_set_t *ds, const value_list_t *vl, struct wg_callback *cb) { - char buffer[4096]; + char buffer[WG_SEND_BUF_SIZE]; int status; if (0 != strcmp (ds->type, vl->type)) -- 2.30.2