aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelen <jjelen@redhat.com>2019-09-25 15:58:45 +0200
committerJakub Jelen <jjelen@redhat.com>2019-10-01 10:24:06 +0200
commit689f1b0a6b8a40bf15917abed450b568c031285b (patch)
tree512327ef364d4635a28c69406fad8b4d37667af5
parenta22367fbe1932dbf9d0c06917fc688897c6aa96c (diff)
downloadlibssh-689f1b0a6b8a40bf15917abed450b568c031285b.tar.gz
libssh-689f1b0a6b8a40bf15917abed450b568c031285b.tar.xz
libssh-689f1b0a6b8a40bf15917abed450b568c031285b.zip
callbacks: Improve documentation about callbacks handling
Fixes T103 Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
-rw-r--r--include/libssh/callbacks.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/include/libssh/callbacks.h b/include/libssh/callbacks.h
index 15e88014..972314cb 100644
--- a/include/libssh/callbacks.h
+++ b/include/libssh/callbacks.h
@@ -354,6 +354,9 @@ typedef struct ssh_server_callbacks_struct *ssh_server_callbacks;
* This functions sets the callback structure to use your own callback
* functions for user authentication, new channels and requests.
*
+ * Note, that the structure is not copied to the session structure so it needs
+ * to be valid for the whole session lifetime.
+ *
* @code
* struct ssh_server_callbacks_struct cb = {
* .userdata = data,
@@ -548,6 +551,9 @@ typedef struct ssh_packet_callbacks_struct *ssh_packet_callbacks;
* This functions sets the callback structure to use your own callback
* functions for auth, logging and status.
*
+ * Note, that the callback structure is not copied into the session so it needs
+ * to be valid for the whole session lifetime.
+ *
* @code
* struct ssh_callbacks_struct cb = {
* .userdata = data,
@@ -849,7 +855,11 @@ typedef struct ssh_channel_callbacks_struct *ssh_channel_callbacks;
* @brief Set the channel callback functions.
*
* This functions sets the callback structure to use your own callback
- * functions for channel data and exceptions
+ * functions for channel data and exceptions.
+ *
+ * Note, that the structure is not copied to the channel structure so it needs
+ * to be valid as for the whole life of the channel or until it is removed with
+ * ssh_remove_channel_callbacks().
*
* @code
* struct ssh_channel_callbacks_struct cb = {