From 8942b2df00f71684f793308638f657bc8612cb7b Mon Sep 17 00:00:00 2001 From: Robert Widmann Date: Sun, 20 Mar 2016 23:32:33 -0400 Subject: Remove duplicate mCanIdle --- src/core/imap/MCIMAPSession.cpp | 13 ++++++------- src/core/imap/MCIMAPSession.h | 1 - 2 files changed, 6 insertions(+), 8 deletions(-) (limited to 'src') 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; -- cgit v1.2.3