1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-07-29 13:01:13 +03:00

tests: Provide the server state to callbacks

This aims to make it easier to implement custom callbacks.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-01-08 13:58:45 +01:00
committed by Andreas Schneider
parent 7f18a27504
commit 13aa791e7b
2 changed files with 11 additions and 0 deletions

View File

@ -64,6 +64,10 @@ struct channel_data_st {
ssh_event event;
/* Terminal size struct. */
struct winsize *winsize;
/* This pointer will hold the server state for default callbacks */
void *server_state;
/* This pointer is useful to set data for custom callbacks */
void *extra_data;
};
/* A userdata struct for session. */
@ -77,6 +81,10 @@ struct session_data_st {
#ifdef WITH_PCAP
ssh_pcap_file pcap;
#endif
/* This pointer will hold the server state for default callbacks */
void *server_state;
/* This pointer is useful to set data for custom callbacks */
void *extra_data;
};
int auth_password_cb(ssh_session session, const char *user,