diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-07-21 11:26:55 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-07-21 11:26:55 +0200 |
commit | 08c31ccf314adf0ad85b446114591767d38e210c (patch) | |
tree | ed1d9d2a4dca4a580123a8dc4f50736a171ce202 | |
parent | f3e09612b3788576dceaf3bb1059752ee6b90174 (diff) | |
download | libssh-08c31ccf314adf0ad85b446114591767d38e210c.tar.gz libssh-08c31ccf314adf0ad85b446114591767d38e210c.tar.xz libssh-08c31ccf314adf0ad85b446114591767d38e210c.zip |
error: Fix logging in ssh_set_error().
-rw-r--r-- | src/error.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/error.c b/src/error.c index e30e7b03..fbe0e787 100644 --- a/src/error.c +++ b/src/error.c @@ -61,9 +61,11 @@ void _ssh_set_error(void *error, va_end(va); err->error.error_code = code; - ssh_log_function(SSH_LOG_WARN, - function, - err->error.error_buffer); + if (ssh_get_log_level() >= SSH_LOG_WARN) { + ssh_log_function(SSH_LOG_WARN, + function, + err->error.error_buffer); + } } /** |