]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: buf: Add function to insert a string at an absolute offset in a buffer
authorChristopher Faulet <cfaulet@haproxy.com>
Mon, 24 Feb 2020 10:28:05 +0000 (11:28 +0100)
committerChristopher Faulet <cfaulet@haproxy.com>
Fri, 6 Mar 2020 13:12:59 +0000 (14:12 +0100)
commit251f4917c3442c6c2716daca667c3022dda484ad
treea57529b2a9c46220f8aebf0153ad82aad9ed6537
parentba837ec3674a1a783a56f8ecc040f4fc475bd2f5
MINOR: buf: Add function to insert a string at an absolute offset in a buffer

The b_insert_blk() function may now be used to insert a string, given a pointer
and the string length, at an absolute offset in a buffer, moving data between
this offset and the buffer's tail just after the end of the inserted string. The
buffer's length is automatically updated. This function supports wrapping. All
the string is copied or nothing. So it returns 0 if there are not enough space
to perform the copy. Otherwise, the number of bytes copied is returned.
include/common/buf.h