From: Florian Forster Date: Wed, 16 Jan 2013 12:18:32 +0000 (+0100) Subject: write_graphite: Decrease a buffer size. X-Git-Tag: collectd-5.2.1~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=bee3a96910d1a0025e74dc2e584b0c4a20635446;p=collectd.git 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. --- 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))