From 0dc57fdcf17fd9e5c000e2a07380ec6878d3afcf Mon Sep 17 00:00:00 2001 From: Aris Adamantiadis Date: Tue, 19 Jul 2011 22:16:28 +0200 Subject: Fixes the ssh_log issue on ssh_bind handles. (cherry picked from commit da954c2c5ee85bcbe2f5ad9f507a6306b0f5f8b9) Conflicts: src/keyfiles.c --- src/error.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/error.c') 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 #include #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); } /** -- cgit