aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/imap/MCIMAPSession.cpp
diff options
context:
space:
mode:
authorGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-03-07 22:14:47 -0800
committerGravatar Hoa V. DINH <dinh.viet.hoa@gmail.com>2016-03-07 22:14:47 -0800
commitf3be74e24f4b460bf309e4b6289973c34b137382 (patch)
treeda08b5c577685b6fc395d87a287b8d8717cbb149 /src/core/imap/MCIMAPSession.cpp
parenta55c8f370bd663ea1d31fed230987711aa1cf176 (diff)
Improved error management
Diffstat (limited to 'src/core/imap/MCIMAPSession.cpp')
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index 8b8565d9..8f404cc9 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -480,6 +480,11 @@ bool IMAPSession::isVoIPEnabled()
return mVoIPEnabled;
}
+String * IMAPSession::loginResponse()
+{
+ return mLoginResponse;
+}
+
static bool hasError(int errorCode)
{
return ((errorCode != MAILIMAP_NO_ERROR) && (errorCode != MAILIMAP_NO_ERROR_AUTHENTICATED) &&
@@ -829,6 +834,7 @@ void IMAPSession::login(ErrorCode * pError)
if (mImap->imap_response != NULL) {
response = String::stringWithUTF8Characters(mImap->imap_response);
}
+ MC_SAFE_REPLACE_COPY(String, mLoginResponse, response);
if (response->locationOfString(MCSTR("not enabled for IMAP use")) != -1) {
* pError = ErrorGmailIMAPNotEnabled;
}