[sslh] [PATCH 02/10] Let defer_write accumulate data

ondra at mistotebe.net ondra at mistotebe.net
Tue Sep 24 16:19:57 CEST 2013


On Tue, Sep 24, 2013 at 02:20:21PM +0200, Yves Rutschle wrote:
> On Tue, Sep 24, 2013 at 10:09:32AM +0200, ondra+sslh at mistotebe.net wrote:
>> Also, defer_write was not able add more data to the buffer before the
>> patch, causing a memory leak instead.
> 
> Yes, that's also correct. defer_write just get some data to
> write "later", then sslh stops reading until that data has
> been written and the deferred buffer freed.
> 
> Ok, so maybe I misunderstood the indent of your patch: I
> thought it was precisely to be able to pile up additional
> data in the deferred buffer. If not, then I don't get the
> point of your patch? (I haven't gone through the following
> patches in depth yet).

Yes, to allow adding more data to a buffer with some data already
present, so that a probe can say it does not have enough data to respond
and the test is performed once more data has arrived. For this,
defer_write does not have to worry about about a partially drained
buffer as there is nowhere to drain to yet.



More information about the sslh mailing list