summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-04-24 18:45:21 -0500
committerSlávek Banko <slavek.banko@axis.cz>2012-06-03 03:27:11 +0200
commit33d5f26e9ee2830794bdce99522fe324001d42a7 (patch)
tree5950ecfa2dee57daa2d73fb78f5437b53c4b47a8
parent0d8f014e25c6153da88a4df237c2670dfd997915 (diff)
downloadtdebase-33d5f26e9ee2830794bdce99522fe324001d42a7.tar.gz
tdebase-33d5f26e9ee2830794bdce99522fe324001d42a7.zip
Fix sftp when nonstandard port is specified in ssh config
(cherry picked from commit 073dc86aceaa060597d7653747c3c6c14d0ed59d)
-rw-r--r--kioslave/sftp/kio_sftp.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/kioslave/sftp/kio_sftp.cpp b/kioslave/sftp/kio_sftp.cpp
index 2c8f995a5..f8c12404a 100644
--- a/kioslave/sftp/kio_sftp.cpp
+++ b/kioslave/sftp/kio_sftp.cpp
@@ -481,11 +481,7 @@ void sftpProtocol::setHost (const TQString& h, int port, const TQString& user, c
if( port > 0 )
mPort = port;
else {
- struct servent *pse;
- if( (pse = getservbyname("ssh", "tcp") ) == NULL )
- mPort = 22;
- else
- mPort = ntohs(pse->s_port);
+ mPort = -1;
}
mUsername = user;