Skip to content

Commit

Permalink
moving function to the right place to fix warning of implicit declara…
Browse files Browse the repository at this point in the history
…tion

Signed-off-by: Gautam Punhani <[email protected]>
  • Loading branch information
gautampunhani committed Jul 30, 2021
1 parent 6db1496 commit 2f2dc26
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/flb_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 2f2dc26

Please sign in to comment.