From 16b4f54533669f51b95d2e4faa69f342d4e72e31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20L=C3=A9caille?= Date: Thu, 23 May 2019 12:15:04 +0200 Subject: [PATCH] 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. --- src/stick_table.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/stick_table.c b/src/stick_table.c index 4901edf2a..a555e6463 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");