mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 21:00:33 +09:00
Document that ssh_channel_read_nonblocking() may return SSH_EOF
The current documentation incorrectly states that it will return 0 on EOF, but the function calls ssh_channel_poll() internally, which will return SSH_EOF, which will then be returned by ssh_channel_read_nonblocking(). Signed-off-by: James Wrigley <james@puiterwijk.org> Reviewed-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Norbert Pocs <norbertpocs0@gmail.com>
This commit is contained in:
committed by
Jakub Jelen
parent
24dfc59264
commit
a5cc515f02
@@ -3150,10 +3150,8 @@ int ssh_channel_read_timeout(ssh_channel channel,
|
||||
*
|
||||
* @param[in] is_stderr A boolean to select the stderr stream.
|
||||
*
|
||||
* @return The number of bytes read, 0 if nothing is available or
|
||||
* SSH_ERROR on error.
|
||||
*
|
||||
* @warning Don't forget to check for EOF as it would return 0 here.
|
||||
* @return The number of bytes read (0 if nothing is available),
|
||||
* SSH_ERROR on error, and SSH_EOF if the channel is EOF.
|
||||
*
|
||||
* @see ssh_channel_is_eof()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user