]> git.ipfire.org Git - thirdparty/haproxy.git/commit
BUG/MEDIUM: lua: many errors when we try to send data with the channel API
authorThierry FOURNIER <tfournier@exceliance.fr>
Fri, 6 Mar 2015 00:07:45 +0000 (01:07 +0100)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Mar 2015 16:47:52 +0000 (17:47 +0100)
commitdeb5d7388361e21308503a898e11561eece2d763
tree70822acc80ad52bdba3b2acab2620702622e3ce5
parent53e08ecc41037a4e6d831e848ce809f625aefb7f
BUG/MEDIUM: lua: many errors when we try to send data with the channel API

First we allow to use the reserved size to write the data that
will be sent. The reserved size remain guaranty because the
writed data will be sent quickly and the reserved room we be
again avalaible.

This permits to guaranty that the function send always have
avalaible space to send data (except if it cannot connect to
the server).

The function buffer_replace2 works only on contiguous buffer.
This patch also detects if the required size is contiguous.
If it not the case we realign the buffer.
src/hlua.c