diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-07-19 22:16:28 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2011-09-17 22:01:43 +0200 |
commit | 0dc57fdcf17fd9e5c000e2a07380ec6878d3afcf (patch) | |
tree | f15352f0ddd948e9e9ba1ed1c5103d3333220bef /src/error.c | |
parent | 3799670d01f4faa68b6ab8055250bc042d707b29 (diff) | |
download | libssh-0dc57fdcf17fd9e5c000e2a07380ec6878d3afcf.tar.gz libssh-0dc57fdcf17fd9e5c000e2a07380ec6878d3afcf.tar.xz libssh-0dc57fdcf17fd9e5c000e2a07380ec6878d3afcf.zip |
Fixes the ssh_log issue on ssh_bind handles.
(cherry picked from commit da954c2c5ee85bcbe2f5ad9f507a6306b0f5f8b9)
Conflicts:
src/keyfiles.c
Diffstat (limited to 'src/error.c')
-rw-r--r-- | src/error.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/error.c b/src/error.c index e2d02ce7..46d6382d 100644 --- a/src/error.c +++ b/src/error.c @@ -24,6 +24,7 @@ #include <stdio.h> #include <stdarg.h> #include "libssh/priv.h" +#include "libssh/session.h" /** * @defgroup libssh_error The SSH error functions. @@ -48,13 +49,13 @@ * @param ... The arguments for the format string. */ void ssh_set_error(void *error, int code, const char *descr, ...) { - struct error_struct *err = error; + struct ssh_common_struct *err = error; va_list va; va_start(va, descr); - vsnprintf(err->error_buffer, ERROR_BUFFERLEN, descr, va); + vsnprintf(err->error.error_buffer, ERROR_BUFFERLEN, descr, va); va_end(va); - err->error_code = code; - ssh_log(error,SSH_LOG_RARE,"Error : %s",err->error_buffer); + err->error.error_code = code; + ssh_log_common(err,SSH_LOG_RARE,"Error : %s",err->error.error_buffer); } /** |