diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-04-29 10:25:00 +0000 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-04-29 10:25:00 +0000 |
commit | 75fb96f7402e32b9114fdb72aa5af5d5f92348e4 (patch) | |
tree | 1c5aa39e0608484ba78fecf2a0282393d7b9af81 /libssh/auth.c | |
parent | 907b4075c072983bc9c45d6b8dfad84fd401839a (diff) | |
download | libssh-75fb96f7402e32b9114fdb72aa5af5d5f92348e4.tar.gz libssh-75fb96f7402e32b9114fdb72aa5af5d5f92348e4.tar.xz libssh-75fb96f7402e32b9114fdb72aa5af5d5f92348e4.zip |
Improve kbdauth_send.
git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@642 7dcaeef0-15fb-0310-b436-a5af3365683c
Diffstat (limited to 'libssh/auth.c')
-rw-r--r-- | libssh/auth.c | 7 |
1 files changed, 3 insertions, 4 deletions
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; } |