diff options
author | Dmitry Isaikin <isaikin-dmitry@yandex.ru> | 2016-05-11 22:05:02 +0300 |
---|---|---|
committer | HoĆ V. DINH <dinh.viet.hoa@gmail.com> | 2016-05-11 12:05:02 -0700 |
commit | a9f8d0676ffa05d13f9968af087d899cbea06e8a (patch) | |
tree | 11f7fc75a69138f779832bb0318611ddb8af4104 /src/core/imap/MCIMAPSession.cpp | |
parent | f0af8ad158b559b12063be902a5ee6114c4b0a7c (diff) |
Detect Rambler server on connect stage (#1424)
Diffstat (limited to 'src/core/imap/MCIMAPSession.cpp')
-rwxr-xr-x | src/core/imap/MCIMAPSession.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp index f564a435..9847d1cf 100755 --- a/src/core/imap/MCIMAPSession.cpp +++ b/src/core/imap/MCIMAPSession.cpp @@ -341,6 +341,7 @@ void IMAPSession::init() mFolderMsgCount = 0; mFirstUnseenUid = 0; mYahooServer = false; + mRamblerRuServer = false; mLastFetchedSequenceNumber = 0; mCurrentFolder = NULL; pthread_mutex_init(&mIdleLock, NULL); @@ -652,6 +653,7 @@ void IMAPSession::connect(ErrorCode * pError) UNLOCK(); mNamespaceEnabled = true; } + mRamblerRuServer = (mHostname->locationOfString(MCSTR(".rambler.ru")) != -1); } mState = STATE_CONNECTED; @@ -2828,7 +2830,7 @@ Data * IMAPSession::fetchMessageAttachment(String * folder, bool identifier_is_u fetch_type = mailimap_fetch_type_new_fetch_att(fetch_att); #ifdef LIBETPAN_HAS_MAILIMAP_RAMBLER_WORKAROUND - if ((encoding == EncodingBase64 || encoding == EncodingUUEncode) && (mHostname->compare(MCSTR("imap.rambler.ru")) == 0)) { + if (mRamblerRuServer && (encoding == EncodingBase64 || encoding == EncodingUUEncode)) { mailimap_set_rambler_workaround_enabled(mImap, 1); } #endif |