[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sftp_read receives EOF on second call for a 24kb file


How were you able to read it in chunks if sftp_read only returns EOF on
subsequent reads?
On Oct 22, 2013 6:43 PM, "Darren" <d.tomlin@xxxxxxxxxxxx> wrote:

>   Hi Kevin,
>
> I had the same problem when reading a file although not sure if it is a
> bug I did file a bug report, the way I solved this
> issue is to read the file in chunks and keep track of the file pointer
> position, each time reading the next chunk of data until eof.
>
> Hope this helps
>
>  -----Original Message-----
> From: Kevin Lambert <klambert@xxxxxxxxx>
> To: libssh <libssh@xxxxxxxxxx>
> Sent: Tue, 22 Oct 2013 20:11
> Subject: sftp_read receives EOF on second call for a 24kb file
>
>  I have built and am running libssh 0.5.5 for windows x32 and am trying
> to pull a 24kb file over.  I have my buffer size set to 1024 (but have
> tried 4096 with the same result).  The first call to sftp_read returns back
> 1024 as the count of bytes read but the subsequent call returns 0.  When I
> stepped through sftp_read I found that sftp_read was receiving SSH_FX_EOF
> even though there is still 23kb left to read.  Am I opening the ssh or sftp
> session incorrectly?  I have attached the relevant code.
>
> Thanks,
>
> Kevin
>
>

Follow-Ups:
Re: sftp_read receives EOF on second call for a 24kb fileDarren <d.tomlin@xxxxxxxxxxxx>
References:
Re: sftp_read receives EOF on second call for a 24kb fileDarren <d.tomlin@xxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org