aboutsummaryrefslogtreecommitdiff
path: root/src/client.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2014-10-28 10:33:20 +0100
committerAndreas Schneider <asn@cryptomilk.org>2014-12-25 12:32:16 +0100
commitbb18442fe8f58a483713eb2b988b3da9869ddf86 (patch)
tree1469c0d6289a313d73907ab95c5985e838c9a23b /src/client.c
parentc2aed4ca78030d9014a890cb4370e6dc8264823f (diff)
downloadlibssh-bb18442fe8f58a483713eb2b988b3da9869ddf86.tar.gz
libssh-bb18442fe8f58a483713eb2b988b3da9869ddf86.tar.xz
libssh-bb18442fe8f58a483713eb2b988b3da9869ddf86.zip
options: Fix setting the port.
Make sure we correctly read the port from the config file. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src/client.c')
-rw-r--r--src/client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/client.c b/src/client.c
index 0a45944c..64ce5dec 100644
--- a/src/client.c
+++ b/src/client.c
@@ -526,7 +526,7 @@ int ssh_connect(ssh_session session) {
} else {
ret=ssh_socket_connect(session->socket,
session->opts.host,
- session->opts.port,
+ session->opts.port > 0 ? session->opts.port : 22,
session->opts.bindaddr);
}
if (ret == SSH_ERROR) {