aboutsummaryrefslogtreecommitdiff
path: root/src/server.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2012-02-05 11:50:49 +0100
committerAndreas Schneider <asn@cryptomilk.org>2012-02-05 11:50:49 +0100
commitee774479deb609fdb6989c7c452d6007ab4d3384 (patch)
treebb8b7b77a2354322b18090326bf794ed206332d5 /src/server.c
parent840f75f10c4e9fd7f6fb6289ae9902a40906bde6 (diff)
downloadlibssh-ee774479deb609fdb6989c7c452d6007ab4d3384.tar.gz
libssh-ee774479deb609fdb6989c7c452d6007ab4d3384.tar.xz
libssh-ee774479deb609fdb6989c7c452d6007ab4d3384.zip
session: Use a struct for all options.
Diffstat (limited to 'src/server.c')
-rw-r--r--src/server.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server.c b/src/server.c
index 3f7721bb..5f1d8230 100644
--- a/src/server.c
+++ b/src/server.c
@@ -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)");