REORG: include: move queue.h to haproxy/queue{,-t}.h
Nothing outstanding here. A number of call places were not justified and
removed.
diff --git a/include/haproxy/queue-t.h b/include/haproxy/queue-t.h
new file mode 100644
index 0000000..4102285
--- /dev/null
+++ b/include/haproxy/queue-t.h
@@ -0,0 +1,49 @@
+/*
+ * include/haproxy/queue-t.h
+ * This file defines variables and structures needed for queues.
+ *
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef _HAPROXY_QUEUE_T_H
+#define _HAPROXY_QUEUE_T_H
+
+#include <import/eb32tree.h>
+#include <haproxy/api-t.h>
+
+struct proxy;
+struct server;
+struct stream;
+
+struct pendconn {
+ int strm_flags; /* stream flags */
+ unsigned int queue_idx; /* value of proxy/server queue_idx at time of enqueue */
+ struct stream *strm;
+ struct proxy *px;
+ struct server *srv; /* the server we are waiting for, may be NULL if don't care */
+ struct server *target; /* the server that was assigned, = srv except if srv==NULL */
+ struct eb32_node node;
+};
+
+#endif /* _HAPROXY_QUEUE_T_H */
+
+/*
+ * Local variables:
+ * c-indent-level: 8
+ * c-basic-offset: 8
+ * End:
+ */
diff --git a/include/proto/queue.h b/include/haproxy/queue.h
similarity index 94%
rename from include/proto/queue.h
rename to include/haproxy/queue.h
index cd4c5ca..bded676 100644
--- a/include/proto/queue.h
+++ b/include/haproxy/queue.h
@@ -1,8 +1,8 @@
/*
- * include/proto/queue.h
+ * include/haproxy/queue.h
* This file defines everything related to queues.
*
- * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu
+ * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -19,17 +19,16 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _PROTO_QUEUE_H
-#define _PROTO_QUEUE_H
+#ifndef _HAPROXY_QUEUE_H
+#define _HAPROXY_QUEUE_H
#include <haproxy/backend.h>
#include <haproxy/api.h>
#include <haproxy/pool.h>
#include <haproxy/proxy-t.h>
-
-#include <types/queue.h>
-#include <types/stream.h>
+#include <haproxy/queue-t.h>
#include <types/server.h>
+#include <types/stream.h>
extern struct pool_head *pool_head_pendconn;
@@ -105,7 +104,7 @@
}
-#endif /* _PROTO_QUEUE_H */
+#endif /* _HAPROXY_QUEUE_H */
/*
* Local variables:
diff --git a/include/proto/server.h b/include/proto/server.h
index 383e832..066faeb 100644
--- a/include/proto/server.h
+++ b/include/proto/server.h
@@ -30,10 +30,8 @@
#include <haproxy/proxy-t.h>
#include <haproxy/task.h>
#include <haproxy/time.h>
-#include <types/queue.h>
#include <types/server.h>
-#include <proto/queue.h>
#include <haproxy/freq_ctr.h>
diff --git a/include/proto/stream.h b/include/proto/stream.h
index 59a95f9..be6fcd2 100644
--- a/include/proto/stream.h
+++ b/include/proto/stream.h
@@ -29,7 +29,7 @@
#include <haproxy/fd.h>
#include <haproxy/freq_ctr.h>
#include <haproxy/obj_type.h>
-#include <proto/queue.h>
+#include <haproxy/queue.h>
#include <haproxy/stick_table.h>
#include <haproxy/task.h>
#include <haproxy/trace.h>
diff --git a/include/types/queue.h b/include/types/queue.h
deleted file mode 100644
index d2cb0ff..0000000
--- a/include/types/queue.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- include/types/queue.h
- This file defines variables and structures needed for queues.
-
- Copyright (C) 2000-2006 Willy Tarreau - w@1wt.eu
-
- This library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation, version 2.1
- exclusively.
-
- This library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
-
- You should have received a copy of the GNU Lesser General Public
- License along with this library; if not, write to the Free Software
- Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-*/
-
-#ifndef _TYPES_QUEUE_H
-#define _TYPES_QUEUE_H
-
-#include <haproxy/api-t.h>
-#include <haproxy/list-t.h>
-
-#include <types/server.h>
-
-struct stream;
-
-struct pendconn {
- int strm_flags; /* stream flags */
- unsigned int queue_idx; /* value of proxy/server queue_idx at time of enqueue */
- struct stream *strm;
- struct proxy *px;
- struct server *srv; /* the server we are waiting for, may be NULL if don't care */
- struct server *target; /* the server that was assigned, = srv except if srv==NULL */
- struct eb32_node node;
-};
-
-#endif /* _TYPES_QUEUE_H */
-
-/*
- * Local variables:
- * c-indent-level: 8
- * c-basic-offset: 8
- * End:
- */
diff --git a/include/types/server.h b/include/types/server.h
index 587b069..dcf5c40 100644
--- a/include/types/server.h
+++ b/include/types/server.h
@@ -40,7 +40,6 @@
#include <haproxy/connection-t.h>
#include <haproxy/freq_ctr-t.h>
-#include <types/queue.h>
#include <haproxy/task-t.h>
diff --git a/include/types/stream.h b/include/types/stream.h
index 8f87ad5..550a7ea 100644
--- a/include/types/stream.h
+++ b/include/types/stream.h
@@ -37,11 +37,11 @@
#include <haproxy/list-t.h>
#include <haproxy/obj_type-t.h>
#include <haproxy/proxy-t.h>
+#include <haproxy/queue-t.h>
#include <haproxy/session-t.h>
#include <haproxy/stream_interface-t.h>
#include <haproxy/vars-t.h>
-#include <types/queue.h>
#include <types/server.h>
#include <haproxy/task-t.h>
#include <haproxy/stick_table-t.h>
diff --git a/src/backend.c b/src/backend.c
index 6e6280a..26e36ae 100644
--- a/src/backend.c
+++ b/src/backend.c
@@ -39,6 +39,7 @@
#include <haproxy/obj_type.h>
#include <haproxy/payload.h>
#include <haproxy/proxy.h>
+#include <haproxy/queue.h>
#include <haproxy/session.h>
#include <haproxy/ssl_sock.h>
#include <haproxy/stream_interface.h>
@@ -52,7 +53,6 @@
#include <haproxy/arg.h>
#include <haproxy/protocol.h>
#include <haproxy/proto_tcp.h>
-#include <proto/queue.h>
#include <haproxy/sample.h>
#include <proto/server.h>
#include <proto/stream.h>
diff --git a/src/check.c b/src/check.c
index 4e898b0..1adbf56 100644
--- a/src/check.c
+++ b/src/check.c
@@ -38,6 +38,7 @@
#include <haproxy/dns.h>
#include <haproxy/istbuf.h>
#include <haproxy/list.h>
+#include <haproxy/queue.h>
#include <haproxy/regex.h>
#include <haproxy/tools.h>
#include <haproxy/time.h>
@@ -59,7 +60,6 @@
#include <haproxy/arg.h>
#include <haproxy/fd.h>
-#include <proto/queue.h>
#include <haproxy/port_range.h>
#include <haproxy/proto_tcp.h>
#include <haproxy/protocol.h>
diff --git a/src/haproxy.c b/src/haproxy.c
index d2aebce..a9e264f 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -125,7 +125,6 @@
#include <haproxy/arg.h>
#include <haproxy/fd.h>
#include <haproxy/protocol.h>
-#include <proto/queue.h>
#include <proto/server.h>
#include <proto/stream.h>
diff --git a/src/hlua.c b/src/hlua.c
index d557777..1ab6f5a 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -54,7 +54,6 @@
#include <haproxy/vars.h>
#include <haproxy/arg.h>
-#include <proto/queue.h>
#include <proto/server.h>
#include <proto/stream.h>
diff --git a/src/lb_chash.c b/src/lb_chash.c
index 508b90c..aaaef89 100644
--- a/src/lb_chash.c
+++ b/src/lb_chash.c
@@ -18,11 +18,11 @@
#include <haproxy/backend.h>
#include <haproxy/api.h>
+#include <haproxy/queue.h>
#include <haproxy/tools.h>
#include <import/eb32tree.h>
#include <types/server.h>
-#include <proto/queue.h>
/* Return next tree node after <node> which must still be in the tree, or be
* NULL. Lookup wraps around the end to the beginning. If the next node is the
diff --git a/src/lb_fas.c b/src/lb_fas.c
index 8967406..fc9ae51 100644
--- a/src/lb_fas.c
+++ b/src/lb_fas.c
@@ -18,10 +18,10 @@
#include <haproxy/backend.h>
#include <haproxy/api.h>
+#include <haproxy/queue.h>
#include <import/eb32tree.h>
#include <types/server.h>
-#include <proto/queue.h>
/* Remove a server from a tree. It must have previously been dequeued. This
diff --git a/src/lb_fwlc.c b/src/lb_fwlc.c
index aef9353..d7c6953 100644
--- a/src/lb_fwlc.c
+++ b/src/lb_fwlc.c
@@ -12,10 +12,10 @@
#include <haproxy/backend.h>
#include <haproxy/api.h>
+#include <haproxy/queue.h>
#include <import/eb32tree.h>
#include <types/server.h>
-#include <proto/queue.h>
/* Remove a server from a tree. It must have previously been dequeued. This
diff --git a/src/lb_fwrr.c b/src/lb_fwrr.c
index 72029a6..145d097 100644
--- a/src/lb_fwrr.c
+++ b/src/lb_fwrr.c
@@ -12,10 +12,10 @@
#include <haproxy/backend.h>
#include <haproxy/api.h>
+#include <haproxy/queue.h>
#include <import/eb32tree.h>
#include <types/server.h>
-#include <proto/queue.h>
static inline void fwrr_remove_from_tree(struct server *s);
static inline void fwrr_queue_by_weight(struct eb_root *root, struct server *s);
diff --git a/src/lb_map.c b/src/lb_map.c
index a6d1cf8..c963180 100644
--- a/src/lb_map.c
+++ b/src/lb_map.c
@@ -13,10 +13,10 @@
#include <haproxy/backend.h>
#include <haproxy/api.h>
#include <haproxy/lb_map.h>
+#include <haproxy/queue.h>
#include <import/eb32tree.h>
#include <types/server.h>
-#include <proto/queue.h>
/* this function updates the map according to server <srv>'s new state.
*
diff --git a/src/queue.c b/src/queue.c
index 9cdce01..ea0b64a 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -73,6 +73,7 @@
#include <haproxy/api.h>
#include <haproxy/http_rules.h>
#include <haproxy/pool.h>
+#include <haproxy/queue.h>
#include <haproxy/sample.h>
#include <haproxy/stream_interface.h>
#include <haproxy/task.h>
@@ -81,7 +82,6 @@
#include <haproxy/thread.h>
#include <import/eb32tree.h>
-#include <proto/queue.h>
#include <proto/server.h>
#include <proto/stream.h>
diff --git a/src/server.c b/src/server.c
index df90b22..4751065 100644
--- a/src/server.c
+++ b/src/server.c
@@ -28,6 +28,7 @@
#include <haproxy/errors.h>
#include <haproxy/global.h>
#include <haproxy/namespace.h>
+#include <haproxy/queue.h>
#include <haproxy/sample.h>
#include <haproxy/stats-t.h>
#include <haproxy/stream_interface.h>
@@ -36,7 +37,6 @@
#include <haproxy/port_range.h>
#include <haproxy/protocol.h>
-#include <proto/queue.h>
#include <proto/server.h>
#include <proto/stream.h>
#include <netinet/tcp.h>
diff --git a/src/stream.c b/src/stream.c
index b73060d..45c1bc8 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -42,6 +42,7 @@
#include <haproxy/log.h>
#include <haproxy/pool.h>
#include <haproxy/proxy.h>
+#include <haproxy/queue.h>
#include <haproxy/session.h>
#include <haproxy/stats-t.h>
#include <haproxy/stream_interface.h>
@@ -55,7 +56,6 @@
#include <haproxy/freq_ctr.h>
#include <proto/stream.h>
#include <haproxy/pipe.h>
-#include <proto/queue.h>
#include <proto/server.h>
#include <haproxy/stick_table.h>