From 75fb96f7402e32b9114fdb72aa5af5d5f92348e4 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 29 Apr 2009 10:25:00 +0000 Subject: Improve kbdauth_send. git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@642 7dcaeef0-15fb-0310-b436-a5af3365683c --- libssh/auth.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libssh') diff --git a/libssh/auth.c b/libssh/auth.c index b65c83c..3c0e476 100644 --- a/libssh/auth.c +++ b/libssh/auth.c @@ -1187,10 +1187,9 @@ static int kbdauth_send(SSH_SESSION *session) { enter_function(); - if (buffer_add_u8(session->out_buffer,SSH2_MSG_USERAUTH_INFO_RESPONSE) < 0) { - goto error; - } - if (buffer_add_u32(session->out_buffer, htonl(session->kbdint->nprompts)) < 0) { + if (buffer_add_u8(session->out_buffer, SSH2_MSG_USERAUTH_INFO_RESPONSE) < 0 || + buffer_add_u32(session->out_buffer, + htonl(session->kbdint->nprompts)) < 0) { goto error; } -- cgit