Skip to content

Commit

Permalink
upstream_ha: Fixed extra parameters storage
Browse files Browse the repository at this point in the history
The extra parameters of an upstream were stored as cfl_variant,
but retrieved as strings (char *) in out_forward.

This would lead to errors when using "Compress gzip" in an
upstream configuration file for out_forward, for example:
[error] [output:forward:forward.0] invalid compress mode: ☺

Signed-off-by: Benoît GARNIER <[email protected]>
  • Loading branch information
Benoit GARNIER authored and edsiper committed Nov 16, 2022
1 parent 8447dbc commit fe13b92
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/flb_upstream_ha.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ static struct flb_upstream_node *create_node(int id,
key[klen] = '\0';

/* Add the key and value to the hash table */
ret = flb_hash_table_add(ht, key, klen, entry->val, vlen);
ret = flb_hash_table_add(ht, key, klen, entry->val->data.as_string, vlen);
if (ret == -1) {
flb_error("[upstream_ha] cannot add key %s to hash table",
entry->key);
Expand Down

0 comments on commit fe13b92

Please sign in to comment.