summaryrefslogtreecommitdiffstats
path: root/libssh
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2010-03-13 14:18:32 +0100
committerAndreas Schneider <mail@cynapses.org>2010-03-13 14:21:57 +0100
commit0b13a6d2654bf4cf8d096b54841d495771660692 (patch)
tree082897dfd69dff6d1cd2ced7924b6b80e7c8606c /libssh
parent74c0201219ffd92d36478a24e9e178f75db16af4 (diff)
Added missing SSH_OPTIONS_FD option.
Diffstat (limited to 'libssh')
-rw-r--r--libssh/options.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libssh/options.c b/libssh/options.c
index 7a54ca47..860302d8 100644
--- a/libssh/options.c
+++ b/libssh/options.c
@@ -436,6 +436,15 @@ int ssh_options_set(ssh_session session, enum ssh_options_e type,
session->port = i & 0xffff;
}
break;
+ case SSH_OPTIONS_FD:
+ if (value == NULL) {
+ session->fd = -1;
+ } else {
+ socket_t *x = (socket_t *) value;
+
+ session->fd = *x & 0xffff;
+ }
+ break;
case SSH_OPTIONS_USER:
SAFE_FREE(session->username);
if (value == NULL) { /* set default username */