author | alwin <alwin> | 2003-12-25 20:10:26 (UTC) |
---|---|---|
committer | alwin <alwin> | 2003-12-25 20:10:26 (UTC) |
commit | bde1302aed8a0e2506684eaae7c2d2d823de42c6 (patch) (unidiff) | |
tree | 24b16fc0f0c969df001615a00ac08a8bd4acd2df /noncore/net | |
parent | 67d7f0b0fc79377fba216e556785f6c630c437ad (diff) | |
download | opie-bde1302aed8a0e2506684eaae7c2d2d823de42c6.zip opie-bde1302aed8a0e2506684eaae7c2d2d823de42c6.tar.gz opie-bde1302aed8a0e2506684eaae7c2d2d823de42c6.tar.bz2 |
try to resolve timeouts via NOOP statement in login
-rw-r--r-- | noncore/net/mail/imapwrapper.cpp | 5 | ||||
-rw-r--r-- | noncore/net/mail/libmailwrapper/imapwrapper.cpp | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/noncore/net/mail/imapwrapper.cpp b/noncore/net/mail/imapwrapper.cpp index 89ec7ab..ab20249 100644 --- a/noncore/net/mail/imapwrapper.cpp +++ b/noncore/net/mail/imapwrapper.cpp | |||
@@ -33,9 +33,14 @@ void IMAPwrapper::login() | |||
33 | /* we are connected this moment */ | 33 | /* we are connected this moment */ |
34 | /* TODO: setup a timer holding the line or if connection closed - delete the value */ | 34 | /* TODO: setup a timer holding the line or if connection closed - delete the value */ |
35 | if (m_imap) { | 35 | if (m_imap) { |
36 | err = mailimap_noop(m_imap); | ||
37 | if (err!=MAILIMAP_NO_ERROR) { | ||
38 | logout(); | ||
39 | } else { | ||
36 | mailstream_flush(m_imap->imap_stream); | 40 | mailstream_flush(m_imap->imap_stream); |
37 | return; | 41 | return; |
38 | } | 42 | } |
43 | } | ||
39 | server = account->getServer().latin1(); | 44 | server = account->getServer().latin1(); |
40 | port = account->getPort().toUInt(); | 45 | port = account->getPort().toUInt(); |
41 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | 46 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { |
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp index 89ec7ab..ab20249 100644 --- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp +++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp | |||
@@ -33,9 +33,14 @@ void IMAPwrapper::login() | |||
33 | /* we are connected this moment */ | 33 | /* we are connected this moment */ |
34 | /* TODO: setup a timer holding the line or if connection closed - delete the value */ | 34 | /* TODO: setup a timer holding the line or if connection closed - delete the value */ |
35 | if (m_imap) { | 35 | if (m_imap) { |
36 | err = mailimap_noop(m_imap); | ||
37 | if (err!=MAILIMAP_NO_ERROR) { | ||
38 | logout(); | ||
39 | } else { | ||
36 | mailstream_flush(m_imap->imap_stream); | 40 | mailstream_flush(m_imap->imap_stream); |
37 | return; | 41 | return; |
38 | } | 42 | } |
43 | } | ||
39 | server = account->getServer().latin1(); | 44 | server = account->getServer().latin1(); |
40 | port = account->getPort().toUInt(); | 45 | port = account->getPort().toUInt(); |
41 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { | 46 | if ( account->getUser().isEmpty() || account->getPassword().isEmpty() ) { |