]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: connection: remove the definitions of conn_xprt_{stop,want}_{send,recv}
authorWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2020 08:58:29 +0000 (09:58 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 21 Feb 2020 10:21:12 +0000 (11:21 +0100)
This marks the end of the transition from the connection polling states
introduced in 1.5-dev12 and the subscriptions in that arrived in 1.9.
The socket layer can now safely use its FD while all upper layers rely
exclusively on subscriptions. These old functions were removed. Some may
deserve some renaming to improved clarty though. The single call to
conn_xprt_stop_both() was dropped in favor of conn_cond_update_polling()
which already does the same.

include/proto/connection.h
src/connection.c

index e4f4de90c3ddaff69af405b0752d23cb27df6c39..c7caeea2b16ff0ff31a9a50673e5c0c209a1b7a0 100644 (file)
@@ -179,66 +179,6 @@ static inline void conn_cond_update_polling(struct connection *c)
                conn_stop_polling(c);
 }
 
-/***** Event manipulation primitives for use by DATA I/O callbacks *****/
-/* The __conn_* versions do not propagate to lower layers and are only meant
- * to be used by handlers called by the connection handler. The other ones
- * may be used anywhere.
- */
-static inline void __conn_xprt_want_recv(struct connection *c)
-{
-       if (conn_ctrl_ready(c))
-               fd_want_recv(c->handle.fd);
-}
-
-static inline void __conn_xprt_stop_recv(struct connection *c)
-{
-       if (conn_ctrl_ready(c))
-               fd_stop_recv(c->handle.fd);
-}
-
-static inline void __conn_xprt_want_send(struct connection *c)
-{
-       if (conn_ctrl_ready(c))
-               fd_want_send(c->handle.fd);
-}
-
-static inline void __conn_xprt_stop_send(struct connection *c)
-{
-       if (conn_ctrl_ready(c))
-               fd_stop_send(c->handle.fd);
-}
-
-static inline void __conn_xprt_stop_both(struct connection *c)
-{
-       if (conn_ctrl_ready(c))
-               fd_stop_both(c->handle.fd);
-}
-
-static inline void conn_xprt_want_recv(struct connection *c)
-{
-       __conn_xprt_want_recv(c);
-}
-
-static inline void conn_xprt_stop_recv(struct connection *c)
-{
-       __conn_xprt_stop_recv(c);
-}
-
-static inline void conn_xprt_want_send(struct connection *c)
-{
-       __conn_xprt_want_send(c);
-}
-
-static inline void conn_xprt_stop_send(struct connection *c)
-{
-       __conn_xprt_stop_send(c);
-}
-
-static inline void conn_xprt_stop_both(struct connection *c)
-{
-       __conn_xprt_stop_both(c);
-}
-
 /* read shutdown, called from the rcv_buf/rcv_pipe handlers when
  * detecting an end of connection.
  */
index c58db587493f7ebaa4e1e6c59db791aa4b61153a..06f2b7bc2fce79006fe551357745cf0375cb38a8 100644 (file)
@@ -245,7 +245,7 @@ int conn_fd_check(struct connection *conn)
         */
        fdtab[fd].linger_risk = 0;
        conn->flags |= CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH;
-       __conn_xprt_stop_both(conn);
+       conn_stop_polling(conn);
        return 0;
 
  wait: