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

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