aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp4
-rwxr-xr-xsrc/core/imap/MCIMAPSession.h1
2 files changed, 4 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
diff --git a/src/core/imap/MCIMAPSession.h b/src/core/imap/MCIMAPSession.h
index e9b8130c..8b3fed0f 100755
--- a/src/core/imap/MCIMAPSession.h
+++ b/src/core/imap/MCIMAPSession.h
@@ -259,6 +259,7 @@ namespace mailcore {
unsigned int mFolderMsgCount;
uint32_t mFirstUnseenUid;
bool mYahooServer;
+ bool mRamblerRuServer;
unsigned int mLastFetchedSequenceNumber;
String * mCurrentFolder;