]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: connection: remove unused CO_FL_WAIT_DATA
authorWilly Tarreau <w@1wt.eu>
Wed, 26 Apr 2017 14:25:12 +0000 (16:25 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 2 Jun 2017 13:50:27 +0000 (15:50 +0200)
Very early in the connection rework process leading to v1.5-dev12, commit
56a77e5 ("MEDIUM: connection: complete the polling cleanups") marked the
end of use for this flag which since was never set anymore, but it continues
to be tested. Let's kill it now.

contrib/debug/flags.c
include/proto/connection.h
include/types/connection.h
src/connection.c
src/stream_interface.c

index cf11a71f1bdfa58a2852fd4cd946a95721feb4ed..2638dd3430ad332c81a2a1f2923d25bbb96d1fab 100644 (file)
@@ -122,7 +122,6 @@ void show_conn_flags(unsigned int f)
        SHOW_FLAG(f, CO_FL_ADDR_TO_SET);
        SHOW_FLAG(f, CO_FL_ADDR_FROM_SET);
        SHOW_FLAG(f, CO_FL_WAIT_ROOM);
-       SHOW_FLAG(f, CO_FL_WAIT_DATA);
        SHOW_FLAG(f, CO_FL_XPRT_READY);
        SHOW_FLAG(f, CO_FL_CTRL_READY);
        SHOW_FLAG(f, CO_FL_CURR_WR_ENA);
index 2380bb8118dde245d2eb668271eae1e16aab2f9e..e8674462bee4702c872af70c5a0a6bceec664d13 100644 (file)
@@ -178,7 +178,7 @@ void conn_update_data_polling(struct connection *c);
  */
 static inline void conn_refresh_polling_flags(struct connection *conn)
 {
-       conn->flags &= ~(CO_FL_WAIT_ROOM | CO_FL_WAIT_DATA);
+       conn->flags &= ~CO_FL_WAIT_ROOM;
 
        if (conn_ctrl_ready(conn)) {
                unsigned int flags = conn->flags & ~(CO_FL_CURR_RD_ENA | CO_FL_CURR_WR_ENA);
index 9d1b51af22010e102d379ed1cbe205327429e5ee..60d977218e27cfbd4c14a460d31d16953c52fa50 100644 (file)
@@ -74,12 +74,12 @@ enum {
        CO_FL_CTRL_READY    = 0x00000100, /* FD was registered, fd_delete() needed */
        CO_FL_XPRT_READY    = 0x00000200, /* xprt_init() done, xprt_close() needed */
 
-       /* These flags are used by data layers to indicate they had to stop
-        * sending data because a buffer was empty (WAIT_DATA) or stop receiving
-        * data because a buffer was full (WAIT_ROOM). The connection handler
-        * clears them before first calling the I/O and data callbacks.
+       /* unused : 0x00000400 */
+
+       /* This flag is used by data layers to indicate they had to stop
+        * receiving data because a buffer was full. The connection handler
+        * clears it before first calling the I/O and data callbacks.
         */
-       CO_FL_WAIT_DATA     = 0x00000400,  /* data source is empty */
        CO_FL_WAIT_ROOM     = 0x00000800,  /* data sink is full */
 
        /* These flags are used to report whether the from/to addresses are set or not */
index c23f464d3bbf6ee0b64f39d273239209fde92bd8..f054cd13b7fedc5e8a849fff5f97821a74a02d05 100644 (file)
@@ -109,7 +109,7 @@ void conn_fd_handler(int fd)
        }
 
        if (conn->xprt && fd_send_ready(fd) &&
-           ((conn->flags & (CO_FL_DATA_WR_ENA|CO_FL_WAIT_DATA|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_DATA_WR_ENA)) {
+           ((conn->flags & (CO_FL_DATA_WR_ENA|CO_FL_ERROR|CO_FL_HANDSHAKE)) == CO_FL_DATA_WR_ENA)) {
                /* force reporting of activity by clearing the previous flags :
                 * we'll have at least ERROR or CONNECTED at the end of an I/O,
                 * both of which will be detected below.
index 4a00388428c4968472110b9e7d2fcf4daf5f52c0..47ba8c1f600ec89c2f9c3d2cf1fbd79fa7c4ada5 100644 (file)
@@ -633,7 +633,7 @@ static void si_conn_send(struct connection *conn)
        /* when we're here, we already know that there is no spliced
         * data left, and that there are sendable buffered data.
         */
-       if (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_WR_SH | CO_FL_DATA_WR_SH | CO_FL_WAIT_DATA | CO_FL_HANDSHAKE))) {
+       if (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_WR_SH | CO_FL_DATA_WR_SH | CO_FL_HANDSHAKE))) {
                /* check if we want to inform the kernel that we're interested in
                 * sending more data after this call. We want this if :
                 *  - we're about to close after this last send and want to merge