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
* @{ */
static int ask_userauth(SSH_SESSION *session){
int ret=0;
enter_function();
if(session->auth_service_asked)
ret = 0;
else if(ssh_service_request(session,"ssh-userauth"))
ret = -1;
else
session->auth_service_asked++;
leave_function();
return ret;
static int ask_userauth(SSH_SESSION *session) {
int rc = 0;
enter_function();
if (session->auth_service_asked) {
rc = 0;
} else if (ssh_service_request(session,"ssh-userauth")) {
rc = -1;
} else {
session->auth_service_asked++;
}
leave_function();
return rc;
}
static void burn(char *ptr){