]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: mux-h2: make h2c_decode_headers() return a status, not a count
authorWilly Tarreau <w@1wt.eu>
Wed, 2 Jan 2019 14:36:11 +0000 (15:36 +0100)
committerWilly Tarreau <w@1wt.eu>
Thu, 3 Jan 2019 17:45:38 +0000 (18:45 +0100)
commit86277d4453f2e5e10954ec0c857abd72f7f45ebe
tree4542b119be0e13a877770062bf6bf01dfa71c1e5
parentb8093cfc0324651473ac65aadf199b91d61128f4
MINOR: mux-h2: make h2c_decode_headers() return a status, not a count

This function used to return a byte count for the output produced, or
zero on failure. Not only this value is not used differently than a
boolean, but it prevents us from returning stream errors when a frame
cannot be extracted because it's too large, or from parsing a frame
and producing nothing on output.

This patch modifies its API to return <0 on errors, 0 on inability to
proceed, or >0 on success, irrelevant to the amount of output data.
src/mux_h2.c