summaryrefslogtreecommitdiff
authoralwin <alwin>2004-10-27 00:20:35 (UTC)
committer alwin <alwin>2004-10-27 00:20:35 (UTC)
commite44d35ca3fd26ef7a3184b07516f6535d8844a83 (patch) (side-by-side diff)
tree4c4ac98450106bb9b05ca76bf5f29e2b6d4fc58b
parentae5855babec6e46802be89ee408d26a2cbbb1981 (diff)
downloadopie-e44d35ca3fd26ef7a3184b07516f6535d8844a83.zip
opie-e44d35ca3fd26ef7a3184b07516f6535d8844a83.tar.gz
opie-e44d35ca3fd26ef7a3184b07516f6535d8844a83.tar.bz2
fixed a bug within tls support
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/mail/libmailwrapper/imapwrapper.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/noncore/net/mail/libmailwrapper/imapwrapper.cpp b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
index 8e5212b..576804d 100644
--- a/noncore/net/mail/libmailwrapper/imapwrapper.cpp
+++ b/noncore/net/mail/libmailwrapper/imapwrapper.cpp
@@ -68,19 +68,21 @@ bool IMAPwrapper::start_tls(bool force_tls)
}
}
}
if (cap_data) {
mailimap_capability_data_free(cap_data);
}
if (try_tls) {
err = mailimap_starttls(m_imap);
- if (err != MAILIMAP_NO_ERROR && force_tls) {
- Global::statusMessage(tr("Server has no TLS support!"));
- odebug << "Server has no TLS support!" << oendl;
+ if (err != MAILIMAP_NO_ERROR) {
+ if (force_tls) {
+ Global::statusMessage(tr("Server has no TLS support!"));
+ odebug << "Server has no TLS support!" << oendl;
+ }
try_tls = false;
} else {
mailstream_low * low;
mailstream_low * new_low;
low = mailstream_get_low(m_imap->imap_stream);
if (!low) {
try_tls = false;
} else {
@@ -180,17 +182,17 @@ void IMAPwrapper::login()
odebug << "Server has no TLS support!" << oendl;
ok = false;
}
/* login */
if (ok) {
- err = mailimap_login_simple( m_imap, (char*)user, (char*)pass );
+ err = mailimap_login( m_imap, (char*)user, (char*)pass );
if ( err != MAILIMAP_NO_ERROR ) {
Global::statusMessage(tr("error logging in imap server: %1").arg(m_imap->imap_response));
ok = false;
}
}
if (!ok) {
err = mailimap_close( m_imap );
mailimap_free( m_imap );