mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Improve channel_open().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@684 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -624,25 +624,27 @@ int channel_default_bufferize(CHANNEL *channel, void *data, int len,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief open a session channel (suited for a shell. Not tcp Forwarding)
|
/**
|
||||||
* \param channel an allocated channel (see channel_new())
|
* @brief Open a session channel (suited for a shell, not TCP forwarding).
|
||||||
* \return SSH_OK on success\n
|
*
|
||||||
* SSH_ERROR on error
|
* @param channel An allocated channel.
|
||||||
* \see channel_open_forward()
|
*
|
||||||
* \see channel_request_env()
|
* @return SSH_OK on success\n
|
||||||
* \see channel_request_shell()
|
* SSH_ERROR on error.
|
||||||
* \see channel_request_exec()
|
*
|
||||||
* \warning API changed from 0.11
|
* @see channel_open_forward()
|
||||||
|
* @see channel_request_env()
|
||||||
|
* @see channel_request_shell()
|
||||||
|
* @see channel_request_exec()
|
||||||
*/
|
*/
|
||||||
int channel_open_session(CHANNEL *channel){
|
int channel_open_session(CHANNEL *channel) {
|
||||||
#ifdef HAVE_SSH1
|
#ifdef HAVE_SSH1
|
||||||
if(channel->session->version==2)
|
if (channel->session->version == 1) {
|
||||||
#endif
|
return channel_open_session1(channel);
|
||||||
return channel_open(channel,"session",64000,32000,NULL);
|
}
|
||||||
#ifdef HAVE_SSH1
|
|
||||||
else
|
|
||||||
return channel_open_session1(channel);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
return channel_open(channel,"session",64000,32000,NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief open a TCP/IP forwarding channel.
|
/** \brief open a TCP/IP forwarding channel.
|
||||||
|
|||||||
Reference in New Issue
Block a user