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

Archive Index This month's Index

Subject: Re: EOF and seek64 bug?

Re: EOF and seek64 bug?

From: Peter Stuge <peter_at_stuge.se>
Date: Thu, 26 Jan 2012 20:52:14 +0100

Gellule Xg wrote:
> I can never get anything back from sftp_read after using sftp_seek64
> to get away from EOF. I've tried with the following patch, and at
> least for me, things seem to work better.
..
> +++ b/src/sftp.c
> @@ -1933,6 +1933,9 @@ libssh2_sftp_seek64(LIBSSH2_SFTP_HANDLE *handle,
> libssh2_uint64_t offset)
> handle->u.file.data_left = handle->u.file.data_len = 0;
> handle->u.file.data = NULL;
> }
> +
> + /* reset EOF to False */
> + handle->u.file.eof = FALSE;
> }
> }

Does this also work correctly for the case of seek64:ing to EOF?

If yes, then please re-send a patch created by git format-patch after
you have created a clean commit locally. If you are not familiar
enough with git then please say so, and we can make the commit for
you. In that case, please mention what name and email address you
would like the patch to have as author.

Thanks!

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-01-26

the libssh2 team