]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: mux: Change get_mux_proto to get an ist as parameter
authorChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Aug 2018 08:21:56 +0000 (10:21 +0200)
committerChristopher Faulet <cfaulet@haproxy.com>
Wed, 8 Aug 2018 08:41:11 +0000 (10:41 +0200)
It simplifies the API and ease comparisons with the multiplexers token (which is
an ist too).

include/proto/connection.h

index 72f297d4cdd28541a74ea359210aae987164cfa1..27edff947a763b91358d65bf4ca88e747efcc25c 100644 (file)
@@ -962,10 +962,9 @@ static inline void unregister_mux_proto(struct mux_proto_list *list)
        LIST_INIT(&list->list);
 }
 
-static inline struct mux_proto_list *get_mux_proto(char *str, int len)
+static inline struct mux_proto_list *get_mux_proto(const struct ist proto)
 {
        struct mux_proto_list *item;
-       struct ist proto = ist2(str, len);
 
        list_for_each_entry(item, &mux_proto_list.list, list) {
                if (isteq(proto, item->token))