diff options
author | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-09 01:05:12 +0200 |
---|---|---|
committer | Aris Adamantiadis <aris@0xbadc0de.be> | 2010-05-09 01:05:12 +0200 |
commit | af519d73ae175e6564de2ccca4180f3e19996e96 (patch) | |
tree | 3ed580a16ef2d6c9957b33b95445aa5957e32400 /libssh/client.c | |
parent | 3a326793fd0c3c1fd3cecd46d57d367ee50db941 (diff) | |
download | libssh-af519d73ae175e6564de2ccca4180f3e19996e96.tar.gz libssh-af519d73ae175e6564de2ccca4180f3e19996e96.tar.xz libssh-af519d73ae175e6564de2ccca4180f3e19996e96.zip |
Fix doc and actually make the test run :)
Diffstat (limited to 'libssh/client.c')
-rw-r--r-- | libssh/client.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libssh/client.c b/libssh/client.c index 805b144..e75ff49 100644 --- a/libssh/client.c +++ b/libssh/client.c @@ -685,7 +685,7 @@ int ssh_connect(ssh_session session) { leave_function(); return SSH_ERROR; } - if (session->fd == -1 && session->host == NULL) { + if (session->fd == -1 && session->host == NULL && session->ProxyCommand == NULL) { ssh_set_error(session, SSH_FATAL, "Hostname required"); leave_function(); return SSH_ERROR; @@ -699,6 +699,8 @@ int ssh_connect(ssh_session session) { if (session->fd != -1) { ssh_socket_set_fd(session->socket, session->fd); ret=SSH_OK; + } else if (session->ProxyCommand != NULL){ + ret=ssh_socket_connect_proxycommand(session->socket, session->ProxyCommand); } else { ret=ssh_socket_connect(session->socket, session->host, session->port, session->bindaddr); |