Skip to content

Commit

Permalink
in_splunk: Rename a struct member
Browse files Browse the repository at this point in the history
Signed-off-by: Hiroshi Hatake <[email protected]>
  • Loading branch information
cosmo0920 authored and edsiper committed Jun 5, 2024
1 parent 37ceabd commit 023cd6f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/in_splunk/splunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ static struct flb_config_map config_map[] = {

{
FLB_CONFIG_MAP_BOOL, "store_token_in_metadata", "true",
0, FLB_TRUE, offsetof(struct flb_splunk, store_token_to_metadata),
0, FLB_TRUE, offsetof(struct flb_splunk, store_token_in_metadata),
"Store Splunk HEC tokens in matadata. If set as false, they will be stored into records."
},

Expand Down
2 changes: 1 addition & 1 deletion plugins/in_splunk/splunk.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct flb_splunk {
/* Token Auth */
struct mk_list auth_tokens;
flb_sds_t ingested_auth_header;
int store_token_to_metadata;
int store_token_in_metadata;
flb_sds_t store_token_key;

struct flb_log_event_encoder log_encoder;
Expand Down
6 changes: 3 additions & 3 deletions plugins/in_splunk/splunk_prot.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static int process_raw_payload_pack(struct flb_splunk *ctx, flb_sds_t tag, char
ret = flb_log_event_encoder_set_current_timestamp(&ctx->log_encoder);
}

if (ctx->store_token_to_metadata == FLB_TRUE) {
if (ctx->store_token_in_metadata == FLB_TRUE) {
if (ret == FLB_EVENT_ENCODER_SUCCESS) {
ret = flb_log_event_encoder_append_body_values(
&ctx->log_encoder,
Expand All @@ -235,7 +235,7 @@ static int process_raw_payload_pack(struct flb_splunk *ctx, flb_sds_t tag, char
}
}

if (ctx->store_token_to_metadata == FLB_TRUE) {
if (ctx->store_token_in_metadata == FLB_TRUE) {
if (ctx->ingested_auth_header != NULL) {
if (ret == FLB_EVENT_ENCODER_SUCCESS) {
ret = flb_log_event_encoder_append_metadata_values(
Expand Down Expand Up @@ -303,7 +303,7 @@ static void process_flb_log_append(struct flb_splunk *ctx, msgpack_object *recor
&tm);
}

if (ctx->store_token_to_metadata == FLB_TRUE) {
if (ctx->store_token_in_metadata == FLB_TRUE) {
if (ret == FLB_EVENT_ENCODER_SUCCESS) {
ret = flb_log_event_encoder_set_body_from_msgpack_object(
&ctx->log_encoder,
Expand Down

0 comments on commit 023cd6f

Please sign in to comment.