summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libssh/channels.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libssh/channels.c b/libssh/channels.c
index f58a232..e85fb3e 100644
--- a/libssh/channels.c
+++ b/libssh/channels.c
@@ -91,10 +91,17 @@ CHANNEL *channel_new(SSH_SESSION *session) {
return channel;
}
-u32 ssh_channel_new_id(SSH_SESSION *session){
- u32 ret=session->maxchannel;
- session->maxchannel++;
- return ret;
+/**
+ * @internal
+ *
+ * @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,