]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: channel: rename bi_avail() to channel_recv_max()
authorWilly Tarreau <w@1wt.eu>
Wed, 14 Jan 2015 19:25:34 +0000 (20:25 +0100)
committerWilly Tarreau <w@1wt.eu>
Wed, 14 Jan 2015 19:26:54 +0000 (20:26 +0100)
This name more accurately reminds that it applies to a channel and not
to a buffer, and that what is returned may be used as a max number of
bytes to pass to recv().

include/proto/channel.h
src/stream_interface.c

index 15ff1a95ac5d496a0ecc446f7cc3ff56f5bd71b3..db179cad4925e3cf3174b201f8851b3ad090f17e 100644 (file)
@@ -324,7 +324,7 @@ static inline int channel_recv_limit(const struct channel *chn)
  * is close to happen. The test is optimized to avoid as many operations as
  * possible for the fast case.
  */
-static inline int bi_avail(const struct channel *chn)
+static inline int channel_recv_max(const struct channel *chn)
 {
        int ret;
 
index 19adcee9a171c774b30b3370e6063a3208636e31..f05f4a8f27d5f94fa323f94a8c8623cab9630c0c 100644 (file)
@@ -1181,7 +1181,7 @@ static void si_conn_recv_cb(struct connection *conn)
         * recv().
         */
        while (!(conn->flags & (CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_DATA_RD_SH | CO_FL_WAIT_ROOM | CO_FL_HANDSHAKE))) {
-               max = bi_avail(chn);
+               max = channel_recv_max(chn);
 
                if (!max) {
                        si->flags |= SI_FL_WAIT_ROOM;