From: Frédéric Lécaille Date: Thu, 23 May 2019 10:15:04 +0000 (+0200) Subject: MINOR: stick-table: Make the CLI stick-table handler support dictionary entry data... X-Git-Tag: v2.0-dev6~49 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=16b4f54533669f51b95d2e4faa69f342d4e72e31;p=thirdparty%2Fhaproxy.git MINOR: stick-table: Make the CLI stick-table handler support dictionary entry data type. Simple patch to dump the values (strings) of dictionary entries stored in stick-table entries with STD_T_DICT as internal data type. --- diff --git a/src/stick_table.c b/src/stick_table.c index 4901edf2a2..a555e64631 100644 --- a/src/stick_table.c +++ b/src/stick_table.c @@ -3347,6 +3347,12 @@ static int table_dump_entry_to_buffer(struct buffer *msg, read_freq_ctr_period(&stktable_data_cast(ptr, std_t_frqp), t->data_arg[dt].u)); break; + case STD_T_DICT: { + struct dict_entry *de; + de = stktable_data_cast(ptr, std_t_dict); + chunk_appendf(msg, "%s", de ? (char *)de->value.key : "-"); + break; + } } } chunk_appendf(msg, "\n");