From 64d7901606e27ab6de67164534494ca7b0055622 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 28 Sep 2016 17:53:34 +0200 Subject: [PATCH] write_http plugin: Don't register a flush callback unconditionally. Fixes: #1955 --- src/write_http.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/write_http.c b/src/write_http.c index 41615d3f..4a5818c7 100644 --- a/src/write_http.c +++ b/src/write_http.c @@ -817,13 +817,10 @@ static int wh_config_node (oconfig_item_t *ci) /* {{{ */ callback_name, cb->location); user_data_t user_data = { - .data = cb + .data = cb, + .free_func = wh_callback_free, }; - plugin_register_flush (callback_name, wh_flush, &user_data); - - user_data.free_func = wh_callback_free; - if (cb->send_metrics) { plugin_register_write (callback_name, wh_write, &user_data); -- 2.30.2