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

Archive Index This month's Index

Subject: RE: SFTP issues

RE: SFTP issues

From: Mark Smith <mts-filtered_at_avcosystems.co.uk>
Date: Thu, 9 Feb 2012 15:00:14 -0000

Daniel Stenberg wrote:

> Or do we already say 0 means EOF?

The documentation on the website states that libssh2_sftp_read() is modelled
on the POSIX read(2) function, which has always returned 0 to indicate EOF.

My own code has always assumed this to be the case, which is why when I
suddenly started getting zero returns when not EOF I was puzzled and assumed
it to be a bug. If we had some other way to determine EOF for SFTP then I
might accept that returning zero might not always mean EOF but there's no
obvious function for determining EOF using any other means than returning
zero out of libssh2_sftp_read() - I'm assuming that libssh2_channel_eof()
cannot be used in this case.

If this is as active a discussion as it seems, perhaps it could be more
effectively explored using IRC?

-- 
Mark
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2012-02-09

the libssh2 team