summaryrefslogtreecommitdiffstats
path: root/tdeioslave/imap4/imap4.cc
diff options
context:
space:
mode:
authorJakub Stachowski <qbast@go2.pl>2008-05-04 10:32:25 +0000
committerMichele Calgaro <michele.calgaro@yahoo.it>2019-04-23 22:44:52 +0900
commit4aacbe5b9ef8a4188b8196d261e06ca2a7ce25e3 (patch)
tree361cf1f5e71929b18cfc6744011a8674095c4f5f /tdeioslave/imap4/imap4.cc
parentfa8bdd097af1961ec3d8ab6bc3a1793e8eaae856 (diff)
downloadtdepim-4aacbe5b9ef8a4188b8196d261e06ca2a7ce25e3.tar.gz
tdepim-4aacbe5b9ef8a4188b8196d261e06ca2a7ce25e3.zip
Default port for imap and imaps. Before after typing imap://server/ in
konqueror, slave would try to connect to port 0. Cherry-picked from: b35c00016dd671aca964907d76aa5a2ed4bc15cc Signed-off-by: Luke Dashjr <luke-jr+git@utopios.org>
Diffstat (limited to 'tdeioslave/imap4/imap4.cc')
-rw-r--r--tdeioslave/imap4/imap4.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/tdeioslave/imap4/imap4.cc b/tdeioslave/imap4/imap4.cc
index 736807748..a50ab2f0f 100644
--- a/tdeioslave/imap4/imap4.cc
+++ b/tdeioslave/imap4/imap4.cc
@@ -95,6 +95,8 @@ extern "C" {
#define IMAP_PROTOCOL "imap"
#define IMAP_SSL_PROTOCOL "imaps"
+#define IMAP_PORT 143
+#define IMAPS_PORT 993
using namespace TDEIO;
@@ -631,7 +633,10 @@ IMAP4Protocol::setHost (const TQString & _host, int _port,
if (!myHost.isEmpty ())
closeConnection ();
myHost = _host;
- myPort = _port;
+ if (_port == 0)
+ myPort = (mySSL) ? IMAPS_PORT : IMAP_PORT;
+ else
+ myPort = _port;
myUser = _user;
myPass = _pass;
}