cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMB long local write

From: Patrick Monnerat <Patrick.Monnerat_at_datasphere.ch>
Date: Mon, 8 Dec 2014 16:00:37 +0100

 
Daniel Stenberg wrote:
>> Warning: Data size exceeds single call write limit!
> ... It must thus at least be converted into a loop of calls.

Indeed :-) The question is: do we set this loop in smb or in Curl_client
write()? The later will resolve this problem for other protocols too.

> It also makes me curious where the values for MAX_PAYLOAD_SIZE and
MAX_MESSAGE_SIZE come from? Also, if we could be happy with
CURL_MAX_WRITE_SIZE sized buffer we could aavoid the extra allocations
in smb.c compeletely! They are a bit disturbing since we already alloc
two 16K buffers that are just wasted when SMB is used.

Don't know. I was just working on it to make it run on OS/400. I didn't
check the whole code.

> Additionally: Curl_client_write() is used without checking the return
code which is a major nono [*]. It MUST check the return code and bail
out on errors.

Sure!

BTW: I have the pleasure to tell that, with the work done on NTLM and
SMB, I've seen a few minutes ago the first SMB curl-download of a Linux
remote file from the OS/400 :-))

Another question: what about the idea of dissociating crypto from TLS
and adding a virtual lib/crypto subdir as it has been done for TLS ?
The motivations are: not all TLS backends offer a public API to
crypto-algorithms we need (although they can be featured by alternative
platform-dependent libs or libcurl's own implementations) and the
conditional stuff about crypto is gently becoming a mess.

Cheers,
Patrick

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-12-08