1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-08-10 06:23:01 +03:00

error: Use new logging function.

This commit is contained in:
Andreas Schneider
2013-07-14 12:12:29 +02:00
parent a73557053e
commit dcd94de076
3 changed files with 10 additions and 8 deletions

View File

@@ -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);

View File

@@ -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);
}
/**

View File

@@ -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) {