error: Use new logging function.
Этот коммит содержится в:
родитель
a73557053e
Коммит
dcd94de076
@ -152,6 +152,10 @@ struct ssh_kex_struct;
|
|||||||
int ssh_get_key_params(ssh_session session, ssh_key *privkey);
|
int ssh_get_key_params(ssh_session session, ssh_key *privkey);
|
||||||
|
|
||||||
/* LOGGING */
|
/* LOGGING */
|
||||||
|
void ssh_log_function(int verbosity,
|
||||||
|
const char *function,
|
||||||
|
const char *buffer);
|
||||||
|
|
||||||
void _ssh_log(int verbosity,
|
void _ssh_log(int verbosity,
|
||||||
const char *function,
|
const char *function,
|
||||||
const char *format, ...) PRINTF_ATTRIBUTE(3, 4);
|
const char *format, ...) PRINTF_ATTRIBUTE(3, 4);
|
||||||
|
@ -61,11 +61,9 @@ void _ssh_set_error(void *error,
|
|||||||
va_end(va);
|
va_end(va);
|
||||||
|
|
||||||
err->error.error_code = code;
|
err->error.error_code = code;
|
||||||
ssh_log_common(err,
|
ssh_log_function(SSH_LOG_WARN,
|
||||||
SSH_LOG_WARN,
|
function,
|
||||||
function,
|
err->error.error_buffer);
|
||||||
"Error: %s",
|
|
||||||
err->error.error_buffer);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -91,9 +91,9 @@ static void ssh_log_stderr(int verbosity,
|
|||||||
fprintf(stderr, " %s\n", buffer);
|
fprintf(stderr, " %s\n", buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void ssh_log_function(int verbosity,
|
void ssh_log_function(int verbosity,
|
||||||
const char *function,
|
const char *function,
|
||||||
const char *buffer)
|
const char *buffer)
|
||||||
{
|
{
|
||||||
ssh_logging_callback log_fn = ssh_get_log_callback();
|
ssh_logging_callback log_fn = ssh_get_log_callback();
|
||||||
if (log_fn) {
|
if (log_fn) {
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user