diff options
author | Jakub Stachowski <[email protected]> | 2008-05-04 10:32:25 +0000 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2019-04-23 23:12:57 +0900 |
commit | 1c5a8d48566351f830909822643e1c6ee2a0fd74 (patch) | |
tree | 30b4f00bbe35eb8dadda3d05e38971d03de6e9c9 /tdeioslave/imap4 | |
parent | 54ffd3dbc106e6fa3161cae96054f1fde212b5ea (diff) | |
download | tdepim-1c5a8d48566351f830909822643e1c6ee2a0fd74.tar.gz tdepim-1c5a8d48566351f830909822643e1c6ee2a0fd74.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 <[email protected]>
(cherry picked from commit 4aacbe5b9ef8a4188b8196d261e06ca2a7ce25e3)
Diffstat (limited to 'tdeioslave/imap4')
-rw-r--r-- | tdeioslave/imap4/imap4.cc | 7 |
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; } |