diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-09-22 12:27:28 +0200 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-09-22 12:28:07 +0200 |
commit | 7de3122b423487c3f2127f0b0a44ed7c6735fbff (patch) | |
tree | 8b38f2a833e09789f4795c3aed6aba6a0a88af5a /libssh/options.c | |
parent | 88f4e9ea24257bfdce511272a65a8d0f7eab8b35 (diff) | |
download | libssh-7de3122b423487c3f2127f0b0a44ed7c6735fbff.tar.gz libssh-7de3122b423487c3f2127f0b0a44ed7c6735fbff.tar.xz libssh-7de3122b423487c3f2127f0b0a44ed7c6735fbff.zip |
Added a userdata generic pointer to the log callback function.
Diffstat (limited to 'libssh/options.c')
-rw-r--r-- | libssh/options.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libssh/options.c b/libssh/options.c index 755ef505..0fa3e895 100644 --- a/libssh/options.c +++ b/libssh/options.c @@ -762,13 +762,14 @@ int ssh_options_allow_ssh2(SSH_OPTIONS *opt, int allow) { * * @warning The message string may contain format string characters. */ -int ssh_options_set_log_function(SSH_OPTIONS *opt, - void (*callback)(const char *message, SSH_SESSION *session, int priority)) { - if (opt == NULL || callback == NULL) { +int ssh_options_set_log_function(SSH_OPTIONS *opt, ssh_log_callback cb, + void *userdata) { + if (opt == NULL || cb == NULL) { return -1; } - opt->log_function = callback; + opt->log_function = cb; + opt->log_userdata = userdata; return 0; } |