added ssh_channel_close() in ShhSession
This commit is contained in:
parent
d04566a6c4
commit
50e8aff8fa
2 changed files with 5 additions and 0 deletions
|
@ -21,6 +21,9 @@ namespace libssh {
|
|||
ssh_channel_send_eof(m_channel);
|
||||
}
|
||||
if (m_isChannelOpened) {
|
||||
ssh_channel_close(m_channel);
|
||||
}
|
||||
if (m_isChannelCreated) {
|
||||
ssh_channel_free(m_channel);
|
||||
}
|
||||
if (m_isSftpInitialized) {
|
||||
|
@ -92,6 +95,7 @@ namespace libssh {
|
|||
return fromLibsshErrorCode(ssh_get_error_code(m_session));
|
||||
}
|
||||
|
||||
m_isChannelCreated = true;
|
||||
int result = ssh_channel_open_session(m_channel);
|
||||
|
||||
if (result == SSH_OK && ssh_channel_is_open(m_channel)) {
|
||||
|
|
|
@ -43,6 +43,7 @@ namespace libssh {
|
|||
ssh_channel m_channel;
|
||||
sftp_session m_sftpSession;
|
||||
|
||||
bool m_isChannelCreated = false;
|
||||
bool m_isChannelOpened = false;
|
||||
bool m_isSessionConnected = false;
|
||||
bool m_isNeedSendChannelEof = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue