mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-09 09:54:25 +09:00
Improve ssh_channel_new_id().
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@672 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
@@ -91,10 +91,17 @@ CHANNEL *channel_new(SSH_SESSION *session) {
|
|||||||
return channel;
|
return channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
u32 ssh_channel_new_id(SSH_SESSION *session){
|
/**
|
||||||
u32 ret=session->maxchannel;
|
* @internal
|
||||||
session->maxchannel++;
|
*
|
||||||
return ret;
|
* @brief Create a new channel identifier.
|
||||||
|
*
|
||||||
|
* @param session The SSH session to use.
|
||||||
|
*
|
||||||
|
* @return The new channel identifier.
|
||||||
|
*/
|
||||||
|
u32 ssh_channel_new_id(SSH_SESSION *session) {
|
||||||
|
return ++(session->maxchannel);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int channel_open(CHANNEL *channel, const char *type_c, int window,
|
static int channel_open(CHANNEL *channel, const char *type_c, int window,
|
||||||
|
|||||||
Reference in New Issue
Block a user