diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-07-14 12:12:29 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-07-14 12:37:12 +0200 |
commit | dcd94de076eb8d68885eda4210a69e3716cb95b5 (patch) | |
tree | d1872870f95e7c9bcc79f16d60beb3e5c6e2c781 | |
parent | a73557053e7a75f9cbb0840421ac3c386cc05321 (diff) | |
download | libssh-dcd94de076eb8d68885eda4210a69e3716cb95b5.tar.gz libssh-dcd94de076eb8d68885eda4210a69e3716cb95b5.tar.xz libssh-dcd94de076eb8d68885eda4210a69e3716cb95b5.zip |
error: Use new logging function.
-rw-r--r-- | include/libssh/priv.h | 4 | ||||
-rw-r--r-- | src/error.c | 8 | ||||
-rw-r--r-- | src/log.c | 6 |
3 files changed, 10 insertions, 8 deletions
diff --git a/include/libssh/priv.h b/include/libssh/priv.h index 35a6e4f3..15855ff8 100644 --- a/include/libssh/priv.h +++ b/include/libssh/priv.h @@ -152,6 +152,10 @@ struct ssh_kex_struct; int ssh_get_key_params(ssh_session session, ssh_key *privkey); /* LOGGING */ +void ssh_log_function(int verbosity, + const char *function, + const char *buffer); + void _ssh_log(int verbosity, const char *function, const char *format, ...) PRINTF_ATTRIBUTE(3, 4); diff --git a/src/error.c b/src/error.c index f4a2af00..e30e7b03 100644 --- a/src/error.c +++ b/src/error.c @@ -61,11 +61,9 @@ void _ssh_set_error(void *error, va_end(va); err->error.error_code = code; - ssh_log_common(err, - SSH_LOG_WARN, - function, - "Error: %s", - err->error.error_buffer); + ssh_log_function(SSH_LOG_WARN, + function, + err->error.error_buffer); } /** @@ -91,9 +91,9 @@ static void ssh_log_stderr(int verbosity, fprintf(stderr, " %s\n", buffer); } -static void ssh_log_function(int verbosity, - const char *function, - const char *buffer) +void ssh_log_function(int verbosity, + const char *function, + const char *buffer) { ssh_logging_callback log_fn = ssh_get_log_callback(); if (log_fn) { |