From 2a6c49a73a34818b731ac7a9c3abc7112477e0f5 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Thu, 16 Jun 2005 17:14:31 +0000 Subject: [PATCH] Add abstract pointer to keyboard-interactive callback --- include/libssh2.h | 2 +- src/userauth.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/libssh2.h b/include/libssh2.h index 0b610fa2..f5d7bf27 100644 --- a/include/libssh2.h +++ b/include/libssh2.h @@ -121,7 +121,7 @@ typedef struct _LIBSSH2_USERAUTH_KBDINT_RESPONSE } LIBSSH2_USERAUTH_KBDINT_RESPONSE; /* 'keyboard-interactive' authentication callback */ -#define LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC(name_) void name_(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses) +#define LIBSSH2_USERAUTH_KBDINT_RESPONSE_FUNC(name_) void name_(const char* name, int name_len, const char* instruction, int instruction_len, int num_prompts, const LIBSSH2_USERAUTH_KBDINT_PROMPT* prompts, LIBSSH2_USERAUTH_KBDINT_RESPONSE* responses, void **abstract) /* Callbacks for special SSH packets */ #define LIBSSH2_IGNORE_FUNC(name) void name(LIBSSH2_SESSION *session, const char *message, int message_len, void **abstract) diff --git a/src/userauth.c b/src/userauth.c index a6e89255..414db1e1 100644 --- a/src/userauth.c +++ b/src/userauth.c @@ -785,7 +785,7 @@ LIBSSH2_API int libssh2_userauth_keyboard_interactive_ex(LIBSSH2_SESSION *sessio prompts[i].echo = *s++; } - response_callback(auth_name, auth_name_len, auth_instruction, auth_instruction_len, num_prompts, prompts, responses); + response_callback(auth_name, auth_name_len, auth_instruction, auth_instruction_len, num_prompts, prompts, responses, &session->abstract); packet_len = 1 /* byte SSH_MSG_USERAUTH_INFO_RESPONSE */ + 4 /* int num-responses */