]> granicus.if.org Git - curl/commitdiff
curl_schannel.h: Use BUFSIZE as the initial buffer size if available
authorMarc Hoersken <info@marc-hoersken.de>
Tue, 19 Jun 2012 08:31:56 +0000 (10:31 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 19 Jun 2012 12:41:43 +0000 (14:41 +0200)
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

index 2869b9263a1fe4f23eaabc3463aa2f5ee8056c79..7cdd2d142bad3dad20bec95e958c23c418791ca7 100644 (file)
 #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);