diff options
author | Andreas Schneider <mail@cynapses.org> | 2009-11-12 12:50:31 +0100 |
---|---|---|
committer | Andreas Schneider <mail@cynapses.org> | 2009-11-12 12:50:31 +0100 |
commit | b4095189d77ac2792e06b3c84426106c71c9aba1 (patch) | |
tree | 1d9ae69f9b4608194aa1cafe657aaf90b405bd07 | |
parent | c0b4c4d60ce7a7615d49fce4ffbe8a9d53650e76 (diff) | |
download | libssh-b4095189d77ac2792e06b3c84426106c71c9aba1.tar.gz libssh-b4095189d77ac2792e06b3c84426106c71c9aba1.tar.xz libssh-b4095189d77ac2792e06b3c84426106c71c9aba1.zip |
Fixed setting the timeout and ssh2 and ssh1 option.
-rw-r--r-- | libssh/options.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libssh/options.c b/libssh/options.c index b18aa37f..2f8a68a6 100644 --- a/libssh/options.c +++ b/libssh/options.c @@ -513,7 +513,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, } else { long *x = (long *) value; - session->timeout = *x; + session->timeout = *x & 0xffffffff; } break; case SSH_OPTIONS_TIMEOUT_USEC: @@ -523,7 +523,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, } else { long *x = (long *) value; - session->timeout_usec = *x; + session->timeout_usec = *x & 0xffffffff; } break; case SSH_OPTIONS_SSH1: @@ -541,7 +541,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, return -1; } else { int *x = (int *) value; - session->ssh2 = *x; + session->ssh2 = *x & 0xffff; } break; case SSH_OPTIONS_LOG_VERBOSITY: @@ -551,7 +551,7 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type, } else { int *x = (int *) value; - session->log_verbosity = *x; + session->log_verbosity = *x & 0xffff; } case SSH_OPTIONS_LOG_VERBOSITY_STR: if (value == NULL) { |