mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 18:04:25 +09:00
Improve channel_request_shell().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@696 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -1179,17 +1179,20 @@ error:
|
|||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief requests a shell
|
/**
|
||||||
* \param channel
|
* @brief Request a shell.
|
||||||
* \returns SSH_SUCCESS on success\n
|
*
|
||||||
* SSH_ERROR on error
|
* @param channel The channel to send the request.
|
||||||
|
*
|
||||||
|
* @returns SSH_SUCCESS on success, SSH_ERROR on error.
|
||||||
*/
|
*/
|
||||||
int channel_request_shell(CHANNEL *channel){
|
int channel_request_shell(CHANNEL *channel) {
|
||||||
#ifdef HAVE_SSH1
|
#ifdef HAVE_SSH1
|
||||||
if(channel->version==1)
|
if (channel->version == 1) {
|
||||||
return channel_request_shell1(channel);
|
return channel_request_shell1(channel);
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
return channel_request(channel,"shell",NULL,1);
|
return channel_request(channel, "shell", NULL, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief requests a subsystem (for example sftp)
|
/** \brief requests a subsystem (for example sftp)
|
||||||
|
|||||||
Reference in New Issue
Block a user