]> git.ipfire.org Git - thirdparty/haproxy.git/commit
CLEANUP: peers: Replace hard-coded values by macros.
authorFrédéric Lécaille <flecaille@haproxy.com>
Fri, 24 May 2019 12:32:27 +0000 (14:32 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 5 Jun 2019 06:33:34 +0000 (08:33 +0200)
commit39143340ecf82e8f0b9199f322d412cdb866604a
treecf0351265e801459be9b6a0e80a8d2d1c8debda2
parent1673bbdf9878776d489caa1528f7f5527c1a78b8
CLEANUP: peers: Replace hard-coded values by macros.

All the peer stick-table messages are made of a 2-byte header (PEER_MSG_HEADER_LEN)
followed by the encoded length of the remaining data wich is harcoded as 5 (in bytes)
for the maximum (PEER_MSG_ENCODED_LENGTH_MAXLEN). With such a length we can encode
a maximum length which equals to (1 << 32) - 1, which is from far enough.

This patches replaces both these values by macros where applicable.
src/peers.c