aboutsummaryrefslogtreecommitdiff
path: root/libssh/log.c
diff options
context:
space:
mode:
authorAris Adamantiadis <aris@0xbadc0de.be>2009-09-23 21:30:56 +0200
committerAris Adamantiadis <aris@0xbadc0de.be>2009-09-23 21:30:56 +0200
commit5bd38a5f376772cc4be5d59d8cfa9a6ff9a517cf (patch)
tree883fa0fdb2a0964ef161521cebb3b70379d621ff /libssh/log.c
parentab60d1d67847f2af20604f8890381a0cbbed0524 (diff)
downloadlibssh-5bd38a5f376772cc4be5d59d8cfa9a6ff9a517cf.tar.gz
libssh-5bd38a5f376772cc4be5d59d8cfa9a6ff9a517cf.tar.xz
libssh-5bd38a5f376772cc4be5d59d8cfa9a6ff9a517cf.zip
Changed the current callback sys to be scalable
Diffstat (limited to 'libssh/log.c')
-rw-r--r--libssh/log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libssh/log.c b/libssh/log.c
index 4a3b275b..f2a4b8b9 100644
--- a/libssh/log.c
+++ b/libssh/log.c
@@ -55,9 +55,9 @@ void ssh_log(SSH_SESSION *session, int verbosity, const char *format, ...) {
vsnprintf(buffer, sizeof(buffer), format, va);
va_end(va);
- if (session->options->log_function) {
- session->options->log_function(session, verbosity, buffer,
- session->options->log_userdata);
+ if (session->options->callbacks && session->options->callbacks->log_function) {
+ session->options->callbacks->log_function(session, verbosity, buffer,
+ session->options->callbacks->userdata);
} else if (verbosity == SSH_LOG_FUNCTIONS) {
if (session->log_indent > 255) {
min = 255;