Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
PettitWesley committed Nov 30, 2023
1 parent 0ba44ad commit 3c5f046
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions plugins/out_s3/s3.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,15 +594,15 @@ static int cb_s3_init(struct flb_output_instance *ins,
return -1;
}

if (ctx->ins->is_threaded == FLB_TRUE) {
ctx->thread_instances = flb_calloc(1, sizeof(struct flb_out_thread_instance *) * ctx->ins->tp_workers);
if (!ctx->thread_instances) {
flb_errno();
return -1;
}
} else {
ctx->thread_instances = NULL;
}
// if (ctx->ins->is_threaded == FLB_TRUE) {
// ctx->thread_instances = flb_calloc(1, sizeof(struct flb_out_thread_instance *) * ctx->ins->tp_workers);
// if (!ctx->thread_instances) {
// flb_errno();
// return -1;
// }
// } else {
// ctx->thread_instances = NULL;
// }

/* the check against -1 is works here because size_t is unsigned
* and (int) -1 == unsigned max value
Expand Down
2 changes: 1 addition & 1 deletion plugins/out_s3/s3.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ struct flb_s3 {
* protect the array and timers_created counter.
*/
pthread_mutex_t create_timer_mutex;
struct flb_out_thread_instance **thread_instances;
struct flb_out_thread_instance *thread_instances[5];
int timers_created;

struct flb_output_instance *ins;
Expand Down

0 comments on commit 3c5f046

Please sign in to comment.