sftp_write needs only handle, buffer and size. it’s a write from start to
finish.
RSz = Read 4 or 16K from SourceFile
while (RSz != EOF) {
sftp_write(handle,ReadBuf,RSz);
RSz = Read 4 or 16K from SourceFile
}
checked our implementation; we use a block size of 30K; works fine.
From: Rafael Hovhannisyan [mailto:[email protected]]
Sent: Tuesday, August 23, 2016 10:13
To: [email protected]
Subject: Re: Short sftp packet!
> Isn't there a 0.7 version available?
No, latest version is 0.6.1 for my dist.
> Try reading and writing in blocks of 4K. Do this to EOF of source file.
I can't set the start offset of bytes for writing; there is no argument in
function which I can find.
2016-08-23 17:44 GMT+04:00 Andreas Schneider
<[email protected]<mailto:[email protected]>>:
On Tuesday, 23 August 2016 16:58:47 CEST Rafael Hovhannisyan wrote:
> LIBSFTP VERSION: 3
> LIBSSH VERSION: 0.6.1-0ubuntu3.3
>
> 2016-08-23 15:54 GMT+04:00 Rafael Hovhannisyan
> <[email protected]<mailto:[email protected]>>:
> > Hello everybody.
> >
> > I have a problem, which I can't understand by myself. When I am trying to
> > write long files(bigger than 255 kb) via sftp_write function, I am getting
> > an error message(Short sftp packet!); but when file was created/updated on
> > remote server, it was with zero bytes.
> >
> > Code: https://github.com/psrafo/justup/blob/master/src/justup.c#L330
Isn't there a 0.7 version available?
--
Andreas Schneider GPG-ID: CC014E3D
www.cryptomilk.org<http://www.cryptomilk.org>
[email protected]<mailto:[email protected]>