From 3c5f0469b9b1fb7207b900272b64a75ca530ee3e Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Thu, 30 Nov 2023 13:59:27 -0800 Subject: [PATCH] wip --- plugins/out_s3/s3.c | 18 +++++++++--------- plugins/out_s3/s3.h | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/out_s3/s3.c b/plugins/out_s3/s3.c index b1adb493810..1608f1a4a0e 100644 --- a/plugins/out_s3/s3.c +++ b/plugins/out_s3/s3.c @@ -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 diff --git a/plugins/out_s3/s3.h b/plugins/out_s3/s3.h index 593d19be69d..8ea94632dfb 100644 --- a/plugins/out_s3/s3.h +++ b/plugins/out_s3/s3.h @@ -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;