From 2f2dc2607a947a436df99a011142679472d4e6b2 Mon Sep 17 00:00:00 2001 From: Gautam Punhani Date: Fri, 30 Jul 2021 07:29:52 +0530 Subject: [PATCH] moving function to the right place to fix warning of implicit declaration Signed-off-by: Gautam Punhani --- src/flb_output.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/flb_output.c b/src/flb_output.c index 57e40654338..191da9a035e 100644 --- a/src/flb_output.c +++ b/src/flb_output.c @@ -766,6 +766,21 @@ void flb_output_net_default(const char *host, const int port, } } +/* Add thread pool for output plugin if configured with workers */ +int flb_output_enable_multi_threading(struct flb_output_instance *ins, struct flb_config *config) +{ + /* Multi-threading enabled ? (through 'workers' property) */ + if (ins->tp_workers > 0) { + if(flb_output_thread_pool_create(config, ins) != 0) { + flb_output_instance_destroy(ins); + return -1; + } + flb_output_thread_pool_start(ins); + } + + return 0; +} + /* Return an instance name or alias */ const char *flb_output_name(struct flb_output_instance *ins) { @@ -979,21 +994,6 @@ int flb_output_init_all(struct flb_config *config) return 0; } -/* Add thread pool for output plugin if configured with workers */ -int flb_output_enable_multi_threading(struct flb_output_instance *ins, struct flb_config *config) -{ - /* Multi-threading enabled ? (through 'workers' property) */ - if (ins->tp_workers > 0) { - if(flb_output_thread_pool_create(config, ins) != 0) { - flb_output_instance_destroy(ins); - return -1; - } - flb_output_thread_pool_start(ins); - } - - return 0; -} - /* Assign an Configuration context to an Output */ void flb_output_set_context(struct flb_output_instance *ins, void *context) {