From d6281ae0466ff95b4b1ae7752388ac9fea5c3648 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 26 Apr 2012 11:23:39 +0200 Subject: [PATCH] MEDIUM: pattern: use smp_fetch_rdp_cookie instead of the pattern specific version pattern_fetch_rdp_cookie() is useless now since it only used to add controls on top of smp_fetch_rdp_cookie() which have now been integrated into the pattern subsystem. Let's remove it. --- src/proto_tcp.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/proto_tcp.c b/src/proto_tcp.c index cc60bc37e6..931da66d2a 100644 --- a/src/proto_tcp.c +++ b/src/proto_tcp.c @@ -1344,19 +1344,6 @@ smp_fetch_rdp_cookie(struct proxy *px, struct session *l4, void *l7, unsigned in return 0; } -static int -pattern_fetch_rdp_cookie(struct proxy *px, struct session *l4, void *l7, unsigned int opt, - const struct arg *arg_p, struct sample *smp) -{ - int ret; - - /* sample type set by smp_fetch_rdp_cookie() */ - ret = smp_fetch_rdp_cookie(px, l4, NULL, opt, arg_p, smp); - if (ret == 0 || (smp->flags & SMP_F_MAY_CHANGE) || smp->data.str.len == 0) - return 0; - return 1; -} - /************************************************************************/ /* All supported ACL keywords must be declared here. */ /************************************************************************/ @@ -1653,7 +1640,7 @@ static struct pattern_fetch_kw_list pattern_fetch_keywords = {{ },{ { "dst_port", smp_fetch_dport, 0, NULL, SMP_T_UINT, SMP_CAP_REQ|SMP_CAP_RES }, { "payload", smp_fetch_payload, ARG2(2,UINT,UINT), val_payload, SMP_T_CBIN, SMP_CAP_REQ|SMP_CAP_RES }, { "payload_lv", smp_fetch_payload_lv, ARG3(2,UINT,UINT,SINT), val_payload_lv, SMP_T_CBIN, SMP_CAP_REQ|SMP_CAP_RES }, - { "rdp_cookie", pattern_fetch_rdp_cookie, ARG1(1,STR), NULL, SMP_T_CSTR, SMP_CAP_REQ|SMP_CAP_RES }, + { "rdp_cookie", smp_fetch_rdp_cookie, ARG1(1,STR), NULL, SMP_T_CSTR, SMP_CAP_REQ|SMP_CAP_RES }, { "src_port", smp_fetch_sport, 0, NULL, SMP_T_UINT, SMP_CAP_REQ|SMP_CAP_RES }, { NULL, NULL, 0, 0, 0 }, }};