diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-07-19 22:16:28 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2011-07-19 22:16:28 +0200 |
commit | da954c2c5ee85bcbe2f5ad9f507a6306b0f5f8b9 (patch) | |
tree | b13cc18e78ff7a0549974b4823678f189fe82b6a /src/error.c | |
parent | dc9ac022f5590272cc7a3dc18726802ffdc73c8f (diff) | |
download | libssh-da954c2c5ee85bcbe2f5ad9f507a6306b0f5f8b9.tar.gz libssh-da954c2c5ee85bcbe2f5ad9f507a6306b0f5f8b9.tar.xz libssh-da954c2c5ee85bcbe2f5ad9f507a6306b0f5f8b9.zip |
Fixes the ssh_log issue on ssh_bind handles.
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); } /** |