schannel: Implement new buffer size strategy
authorMarc Hoersken <info@marc-hoersken.de>
Wed, 20 Jun 2012 05:49:34 +0000 (07:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 20 Jun 2012 20:59:03 +0000 (22:59 +0200)
commit006b83798ea416200991e5075f3cbb30fd16759e
treef8a4434bcda2512d897c4497e0e559b11cb0f684
parent293c9288b334dc908eff655d4c27ac7c02217d52
schannel: Implement new buffer size strategy

Increase decrypted and encrypted cache buffers using limitted
doubling strategy. More information on the mailinglist:
http://curl.haxx.se/mail/lib-2012-06/0255.html

It updates the two remaining reallocations that have already been there
and fixes the other one to use the same "do we need to increase the
buffer"-condition as the other two.  CURL_SCHANNEL_BUFFER_STEP_SIZE was
renamed to CURL_SCHANNEL_BUFFER_FREE_SIZE since that is actually what it
is now.  Since we don't know how much more data we are going to read
during the handshake, CURL_SCHANNEL_BUFFER_FREE_SIZE is used as the
minimum free space required in the buffer for the next operation.
CURL_SCHANNEL_BUFFER_STEP_SIZE was used for that before, too, but since
we don't have a step size now, the define was renamed.
lib/curl_schannel.c
lib/curl_schannel.h