Skip to content

Commit

Permalink
check for empty string
Browse files Browse the repository at this point in the history
Signed-off-by: Maneesh Singh <[email protected]>
  • Loading branch information
mannbiher committed May 4, 2024
1 parent e16c2e0 commit efdb995
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions plugins/out_splunk/splunk.c
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ static flb_sds_t extract_hec_token(struct flb_splunk *ctx, msgpack_object map,

/* Extract HEC token (map which is from metadata lookup) */
if (ctx->metadata_auth_key) {
hec_token = flb_ra_translate_check(ctx->ra_metadata_auth_key, tag, tag_len,
map, NULL, FLB_TRUE);
if (hec_token) {
hec_token = flb_ra_translate(ctx->ra_metadata_auth_key, tag, tag_len,
map, NULL);
if (hec_token && flb_sds_len(hec_token) > 0) {
return hec_token;
}

Expand Down

0 comments on commit efdb995

Please sign in to comment.