mirror of
https://github.com/libssh2/libssh2.git
synced 2025-11-21 14:00:51 +03:00
API add:libssh2_sftp_get_channel
Return the channel of sftp, then caller can control the channel's behavior. Signed-off-by: liuzl <xieepp@gmail.com>
This commit is contained in:
12
src/sftp.c
12
src/sftp.c
@@ -3008,3 +3008,15 @@ libssh2_sftp_last_error(LIBSSH2_SFTP *sftp)
|
||||
|
||||
return sftp->last_errno;
|
||||
}
|
||||
|
||||
/* libssh2_sftp_get_channel
|
||||
* Return the channel of sftp, then caller can control the channel's behavior.
|
||||
*/
|
||||
LIBSSH2_API LIBSSH2_CHANNEL *
|
||||
libssh2_sftp_get_channel(LIBSSH2_SFTP *sftp)
|
||||
{
|
||||
if (!sftp)
|
||||
return NULL;
|
||||
|
||||
return sftp->channel;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user