]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: stick-table: Make the CLI stick-table handler support dictionary entry data...
authorFrédéric Lécaille <flecaille@haproxy.com>
Thu, 23 May 2019 10:15:04 +0000 (12:15 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Jun 2019 06:42:36 +0000 (08:42 +0200)
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

index 4901edf2a2fbd2d6063e6ced0f893c19edcabb9b..a555e646315728fae40eedf0fd45b3b49537b3a5 100644 (file)
@@ -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");