www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: Using libssh2 1.4.3 is creating corrupt files.

Re: Using libssh2 1.4.3 is creating corrupt files.

From: Salvador Fandiņo <sfandino_at_yahoo.com>
Date: Wed, 23 Oct 2013 14:59:52 +0200

On 10/23/2013 11:44 AM, Alexander Lamaison wrote:
> On 22 October 2013 03:38, Peter Stuge <peter_at_stuge.se> wrote:
>> Aaron,
>> Aaron.Stokes_at_us.mahle.com wrote:
>>> Buffer size change (we have no idea what the 33 was for, but it was
>>> probably required in the old version)
>>> -#define WRITEBUFFERSIZE (1024*32)-33
>>> +#define WRITEBUFFERSIZE 1024*128
>> Isn't this buffer size mandated by the SSH protocol?
>> Did you look into what this define affects, to know if you are
>> actually allowed to change that number at all?
> If this just defines the size of the buffer he passes to something
> like libssh2_sftp_write, he should be able to set the buffer to any
> size he likes. Nothing is mandated by the protocol here. Or, at
> least, anything that is is handled by libssh2 internally.

The manual page for libssh2_sftp_write talks about the "write ahead"
feature introduced in version 1.2.8 which looks really suspicious for
this case.

libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2013-10-23

the libssh2 team