aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Widmann <devteam.codafi@gmail.com>2016-03-20 23:32:33 -0400
committerGravatar Robert Widmann <devteam.codafi@gmail.com>2016-03-20 23:32:33 -0400
commit8942b2df00f71684f793308638f657bc8612cb7b (patch)
treedd05eb3cf8d84f4af6dc29d7410fa14961d87bde /src
parentf77b7ca317ada1be8c3c87a083753ab23ccb5ef1 (diff)
Remove duplicate mCanIdle
Diffstat (limited to 'src')
-rwxr-xr-xsrc/core/imap/MCIMAPSession.cpp13
-rwxr-xr-xsrc/core/imap/MCIMAPSession.h1
2 files changed, 6 insertions, 8 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp
index 8f404cc9..1187f013 100755
--- a/src/core/imap/MCIMAPSession.cpp
+++ b/src/core/imap/MCIMAPSession.cpp
@@ -344,7 +344,6 @@ void IMAPSession::init()
mLastFetchedSequenceNumber = 0;
mCurrentFolder = NULL;
pthread_mutex_init(&mIdleLock, NULL);
- mCanIdle = true;
mState = STATE_DISCONNECTED;
mImap = NULL;
mProgressCallback = NULL;
@@ -561,7 +560,7 @@ void IMAPSession::unsetup()
LOCK();
imap = mImap;
mImap = NULL;
- mCanIdle = false;
+ mIdleEnabled = false;
UNLOCK();
if (imap != NULL) {
@@ -3232,8 +3231,8 @@ bool IMAPSession::setupIdle()
{
// main thread
LOCK();
- bool canIdle = mCanIdle;
- if (mCanIdle) {
+ bool canIdle = mIdleEnabled;
+ if (mIdleEnabled) {
mailstream_setup_idle(mImap->imap_stream);
}
UNLOCK();
@@ -3332,7 +3331,7 @@ void IMAPSession::interruptIdle()
{
// main thread
LOCK();
- if (mCanIdle) {
+ if (mIdleEnabled) {
mailstream_interrupt_idle(mImap->imap_stream);
}
UNLOCK();
@@ -3342,7 +3341,7 @@ void IMAPSession::unsetupIdle()
{
// main thread
LOCK();
- if (mCanIdle) {
+ if (mIdleEnabled) {
mailstream_unsetup_idle(mImap->imap_stream);
}
UNLOCK();
@@ -3853,7 +3852,7 @@ void IMAPSession::capabilitySetWithSessionState(IndexSet * capabilities)
}
if (mailimap_has_idle(mImap)) {
LOCK();
- mCanIdle = true;
+ mIdleEnabled = true;
UNLOCK();
}
if (mailimap_has_id(mImap)) {
diff --git a/src/core/imap/MCIMAPSession.h b/src/core/imap/MCIMAPSession.h
index fa230d40..e9b8130c 100755
--- a/src/core/imap/MCIMAPSession.h
+++ b/src/core/imap/MCIMAPSession.h
@@ -263,7 +263,6 @@ namespace mailcore {
unsigned int mLastFetchedSequenceNumber;
String * mCurrentFolder;
pthread_mutex_t mIdleLock;
- bool mCanIdle;
int mState;
mailimap * mImap;
IMAPProgressCallback * mProgressCallback;