1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-11-30 13:01:23 +03:00

Improve ask_userauth().

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/libssh/trunk@659 7dcaeef0-15fb-0310-b436-a5af3365683c
This commit is contained in:
Andreas Schneider
2009-04-30 14:00:07 +00:00
parent 567cc5984a
commit 2317a58996

View File

@@ -36,17 +36,21 @@
/** \addtogroup ssh_auth /** \addtogroup ssh_auth
* @{ */ * @{ */
static int ask_userauth(SSH_SESSION *session){ static int ask_userauth(SSH_SESSION *session) {
int ret=0; int rc = 0;
enter_function();
if(session->auth_service_asked) enter_function();
ret = 0;
else if(ssh_service_request(session,"ssh-userauth")) if (session->auth_service_asked) {
ret = -1; rc = 0;
else } else if (ssh_service_request(session,"ssh-userauth")) {
session->auth_service_asked++; rc = -1;
leave_function(); } else {
return ret; session->auth_service_asked++;
}
leave_function();
return rc;
} }
static void burn(char *ptr){ static void burn(char *ptr){