[MEDIUM] reintroduce BF_HIJACK with produce_content
The stats dump are back. Even very large config files with
5000 servers work fast and well. The SN_SELF_GEN flag has
completely been removed.
diff --git a/include/proto/buffers.h b/include/proto/buffers.h
index 3b5e2bd..194f4ee 100644
--- a/include/proto/buffers.h
+++ b/include/proto/buffers.h
@@ -108,6 +108,18 @@
buf->flags |= BF_SHUTR_NOW | BF_SHUTW_NOW;
}
+/* set the buffer to hijacking mode */
+static inline void buffer_start_hijack(struct buffer *buf)
+{
+ buf->flags |= BF_HIJACK;
+}
+
+/* releases the buffer from hijacking mode */
+static inline void buffer_stop_hijack(struct buffer *buf)
+{
+ buf->flags &= ~BF_HIJACK;
+}
+
/* returns the maximum number of bytes writable at once in this buffer */
static inline int buffer_max(const struct buffer *buf)
{
diff --git a/include/types/buffers.h b/include/types/buffers.h
index bc8a184..d67c932 100644
--- a/include/types/buffers.h
+++ b/include/types/buffers.h
@@ -72,6 +72,7 @@
#define BF_MASK_INTERFACE (BF_MASK_INTF_I | BF_MASK_INTF_O)
#define BF_MASK_ANALYSER (BF_FULL|BF_READ_NULL|BF_READ_ERROR|BF_READ_TIMEOUT|BF_SHUTR|BF_WRITE_ERROR)
+#define BF_MASK_INJECTER (BF_FULL|BF_WRITE_STATUS|BF_WRITE_TIMEOUT|BF_SHUTW)
/* Analysers (buffer->analysers).
* Those bits indicate that there are some processing to do on the buffer
diff --git a/include/types/session.h b/include/types/session.h
index 2d0439b..8b87be2 100644
--- a/include/types/session.h
+++ b/include/types/session.h
@@ -47,7 +47,7 @@
#define SN_BE_ASSIGNED 0x00000008 /* a backend was assigned. Conns are accounted. */
#define SN_CONN_CLOSED 0x00000010 /* "Connection: close" was present or added */
#define SN_MONITOR 0x00000020 /* this session comes from a monitoring system */
-#define SN_SELF_GEN 0x00000040 /* the proxy generates data for the client (eg: stats) */
+/* unused: 0x00000040 */
#define SN_FRT_ADDR_SET 0x00000080 /* set if the frontend address has been filled */
#define SN_REDISP 0x00000100 /* set if this session was redispatched from one server to another */
#define SN_CONN_TAR 0x00000200 /* set if this session is turning around before reconnecting */