aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2013-03-13 20:44:55 +0100
committerAndreas Schneider <asn@cryptomilk.org>2013-07-13 14:51:00 +0200
commite933d1e1b120dfb73f44795c6ccae640b793e708 (patch)
tree4bb2227d9816945be3803a303dda2866db5f73b9 /include
parente76442b650428425a1fbb97d621420216145a3bf (diff)
downloadlibssh-e933d1e1b120dfb73f44795c6ccae640b793e708.tar.gz
libssh-e933d1e1b120dfb73f44795c6ccae640b793e708.tar.xz
libssh-e933d1e1b120dfb73f44795c6ccae640b793e708.zip
callbacks: make the channel accept callback more logical
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/callbacks.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h
index 5fb354f2..f9e1126f 100644
--- a/include/libssh/callbacks.h
+++ b/include/libssh/callbacks.h
@@ -178,13 +178,12 @@ typedef int (*ssh_service_request_callback) (ssh_session session, const char *se
/**
* @brief Handles an SSH new channel open session request
* @param session current session handler
- * @param channel Channel that will be allocated to this channel
* @param userdata Userdata to be passed to the callback function.
- * @returns 0 if the request is to be allowed
- * @returns -1 if the request should not be allowed
- * @warning if the request is denied by the callback, the channel will be deallocated.
+ * @returns a valid ssh_channel handle if the request is to be allowed
+ * @returns NULL if the request should not be allowed
+ * @warning The channel pointer returned by this callback must be closed by the application.
*/
-typedef int (*ssh_channel_open_request_session_callback) (ssh_session session, ssh_channel channel, void *userdata);
+typedef ssh_channel (*ssh_channel_open_request_session_callback) (ssh_session session, void *userdata);
/**
@@ -476,7 +475,7 @@ typedef int (*ssh_channel_pty_request_callback) (ssh_session session,
* @brief SSH channel Shell request from a client.
* @param channel the channel
* @param userdata Userdata to be passed to the callback function.
- * @returns 0 if the pty request is accepted
+ * @returns 0 if the shell request is accepted
* @returns 1 if the request is denied
*/
typedef int (*ssh_channel_shell_request_callback) (ssh_session session,