From: Florian Forster Date: Wed, 28 Sep 2016 15:53:34 +0000 (+0200) Subject: write_http plugin: Don't register a flush callback unconditionally. X-Git-Tag: collectd-5.6.1~6 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=64d7901606e27ab6de67164534494ca7b0055622;p=collectd.git write_http plugin: Don't register a flush callback unconditionally. Fixes: #1955 --- 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);