From: Simon Horman Date: Wed, 15 Jun 2011 06:18:52 +0000 (+0900) Subject: [MINOR] Allow showing and clearing by key of string stick tables X-Git-Tag: v1.5-dev8~211 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=619e3cc245092ac676d086892ed251c0234edb9c;p=thirdparty%2Fhaproxy.git [MINOR] Allow showing and clearing by key of string stick tables --- diff --git a/doc/configuration.txt b/doc/configuration.txt index f70a9522f5..f35971fa7c 100644 --- a/doc/configuration.txt +++ b/doc/configuration.txt @@ -9336,7 +9336,8 @@ clear table [ data. ] | [ key ] - gt : match entries whose data is greater than this value When the key form is used the entry is removed. The key must be of the - same type as the table, which currently is limited to IPv4, IPv6 and integer. + same type as the table, which currently is limited to IPv4, IPv6, integer and + string. Example : $ echo "show table http_proxy" | socat stdio /tmp/sock1 @@ -9562,7 +9563,8 @@ show table [ data. ] | [ key ] When the key form is used the entry is shown. The key must be of the - same type as the table, which currently is limited to IPv4, IPv6 and integer. + same type as the table, which currently is limited to IPv4, IPv6, integer, + and string. Example : $ echo "show table http_proxy" | socat stdio /tmp/sock1 diff --git a/src/dumpstats.c b/src/dumpstats.c index 45424dfa3c..f3619a7c05 100644 --- a/src/dumpstats.c +++ b/src/dumpstats.c @@ -549,6 +549,10 @@ static void stats_sock_table_key_request(struct stream_interface *si, char **arg break; } break; + case STKTABLE_TYPE_STRING: + static_table_key.key = args[4]; + static_table_key.key_len = strlen(args[4]); + break; default: if (show) si->applet.ctx.cli.msg = "Showing keys from tables of type other than ip, ipv6 and integer is not supported\n";