1
0
mirror of https://git.libssh.org/projects/libssh.git synced 2025-12-14 04:18:54 +03:00

session: Use a struct for all options.

This commit is contained in:
Andreas Schneider
2012-02-05 11:50:49 +01:00
parent 840f75f10c
commit ee774479de
16 changed files with 235 additions and 226 deletions

View File

@@ -105,7 +105,7 @@ static int server_set_kex(ssh_session session) {
}
for (i = 0; i < 10; i++) {
if ((wanted = session->wanted_methods[i]) == NULL) {
if ((wanted = session->opts.wanted_methods[i]) == NULL) {
wanted = supported_methods[i];
}
server->methods[i] = strdup(wanted);
@@ -322,11 +322,11 @@ static void ssh_server_connection_callback(ssh_session session){
goto error;
}
/* Here we decide which version of the protocol to use. */
if (ssh2 && session->ssh2) {
if (ssh2 && session->opts.ssh2) {
session->version = 2;
} else if(ssh1 && session->ssh1) {
} else if (ssh1 && session->opts.ssh1) {
session->version = 1;
} else if(ssh1 && !session->ssh1){
} else if (ssh1 && !session->opts.ssh1) {
#ifdef WITH_SSH1
ssh_set_error(session, SSH_FATAL,
"SSH-1 protocol not available (configure session to allow SSH-1)");