From 311097eb2291444daa6721e3237460543d57211b Mon Sep 17 00:00:00 2001
From: Marc Hoersken <info@marc-hoersken.de>
Date: Tue, 19 Jun 2012 10:31:56 +0200
Subject: [PATCH] curl_schannel.h: Use BUFSIZE as the initial buffer size if
 available

Make the Schannel implementation use libcurl's default buffer size
for the initial received encrypted and decrypted data cache buffers.
The implementation still needs to handle more data since more data
might have already been received or decrypted during the handshake
or a read operation which needs to be cached for the next read.
---
 lib/curl_schannel.h |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/lib/curl_schannel.h b/lib/curl_schannel.h
index 2869b92..7cdd2d1 100644
--- a/lib/curl_schannel.h
+++ b/lib/curl_schannel.h
@@ -93,8 +93,13 @@
 #endif
 
 
+#ifdef BUFSIZE
+#define CURL_SCHANNEL_BUFFER_INIT_SIZE  BUFSIZE
+#define CURL_SCHANNEL_BUFFER_STEP_SIZE  BUFSIZE/2
+#else
 #define CURL_SCHANNEL_BUFFER_INIT_SIZE  4096
 #define CURL_SCHANNEL_BUFFER_STEP_SIZE  2048
+#endif
 
 
 CURLcode Curl_schannel_connect(struct connectdata *conn, int sockindex);
-- 
1.7.10.msysgit.1

