]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: ncbuf: implement ncb_is_fragmented()
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 1 Jul 2022 12:45:41 +0000 (14:45 +0200)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Fri, 1 Jul 2022 13:54:23 +0000 (15:54 +0200)
commite0a92a7e56b47af8586b303e33eb5ae413a51a9d
treef8f0df45ae7dccaf3d29fcaab4683ad956041e6b
parent36d4b5e31dd872d8bc6bc309f24d0223fae3305d
MINOR: ncbuf: implement ncb_is_fragmented()

Implement a new status function for ncbuf. It allows to quickly report
if a buffer contains data in a fragmented way, i.e. with gaps in between
or at start of the buffer.

To summarize, a buffer is considered as non-fragmented in the following
cases :
- a null or empty buffer
- a full buffer
- a buffer containing exactly one data block at the beginning, following
  by a gap until the end.
include/haproxy/ncbuf.h
src/ncbuf.c