mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
log: Remove unneeded ssh_log_function().
This commit is contained in:
@@ -267,12 +267,7 @@ SSH_PACKET_CALLBACK(ssh_packet_kexdh_init);
|
||||
|
||||
/* LOGGING */
|
||||
#define SSH_LOG(session, priority, ...) \
|
||||
ssh_log_function(session, priority, __FUNCTION__, __VA_ARGS__)
|
||||
void ssh_log_function(ssh_session session,
|
||||
int prioriry,
|
||||
const char *function,
|
||||
const char *format, ...) PRINTF_ATTRIBUTE(4, 5);
|
||||
|
||||
ssh_log_common(&session->common, priority, __FUNCTION__, __VA_ARGS__)
|
||||
void ssh_log_common(struct ssh_common_struct *common,
|
||||
int verbosity,
|
||||
const char *function,
|
||||
|
||||
16
src/log.c
16
src/log.c
@@ -114,22 +114,6 @@ void ssh_log(ssh_session session,
|
||||
}
|
||||
}
|
||||
|
||||
void ssh_log_function(ssh_session session,
|
||||
int verbosity,
|
||||
const char *function,
|
||||
const char *format, ...)
|
||||
{
|
||||
char buffer[1024];
|
||||
va_list va;
|
||||
|
||||
if (verbosity <= session->common.log_verbosity) {
|
||||
va_start(va, format);
|
||||
vsnprintf(buffer, sizeof(buffer), format, va);
|
||||
va_end(va);
|
||||
do_ssh_log(&session->common, verbosity, function, buffer);
|
||||
}
|
||||
}
|
||||
|
||||
/** @internal
|
||||
* @brief log a SSH event with a common pointer
|
||||
* @param common The SSH/bind session.
|
||||
|
||||
Reference in New Issue
Block a user