Skip to content

Commit

Permalink
out_cloudwatch_logs: aws client extra_user_agent is always flb_sds_t
Browse files Browse the repository at this point in the history
Signed-off-by: Wesley Pettit <[email protected]>
  • Loading branch information
PettitWesley authored and EC2 Default User committed May 22, 2024
1 parent 74f78b2 commit 0b7dbcf
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion plugins/out_cloudwatch_logs/cloudwatch_logs.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins,
struct flb_cloudwatch *ctx = NULL;
struct cw_flush *buf = NULL;
int ret;
flb_sds_t tmp_sds = NULL;
(void) config;
(void) data;

Expand Down Expand Up @@ -333,7 +334,12 @@ static int cb_cloudwatch_init(struct flb_output_instance *ins,
ctx->cw_client->proxy = NULL;
ctx->cw_client->static_headers = &content_type_header;
ctx->cw_client->static_headers_len = 1;
ctx->cw_client->extra_user_agent = (char *) ctx->extra_user_agent;
tmp_sds = flb_sds_create(ctx->extra_user_agent);
if (!tmp_sds) {
flb_errno();
goto error;
}
ctx->cw_client->extra_user_agent = tmp_sds;
ctx->cw_client->retry_requests = ctx->retry_requests;

struct flb_upstream *upstream = flb_upstream_create(config, ctx->endpoint,
Expand Down

0 comments on commit 0b7dbcf

Please sign in to comment.