diff options
author | Robert Widmann <devteam.codafi@gmail.com> | 2016-03-23 16:01:31 -0400 |
---|---|---|
committer | Robert Widmann <devteam.codafi@gmail.com> | 2016-03-23 16:01:31 -0400 |
commit | 75b628cb7678e6bd8cec41edbd0820ce833f9dae (patch) | |
tree | 332b398c8e1e001e9d27b84b86a23f5ce9b2f750 /src | |
parent | 2b42214775f6177826877bf4d83dce8f9653b830 (diff) |
Serialize reads and writes to mIdleEnabled
Diffstat (limited to 'src')
-rwxr-xr-x | src/core/imap/MCIMAPSession.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/core/imap/MCIMAPSession.cpp b/src/core/imap/MCIMAPSession.cpp index 4a561c92..0a0d6389 100755 --- a/src/core/imap/MCIMAPSession.cpp +++ b/src/core/imap/MCIMAPSession.cpp @@ -3916,7 +3916,9 @@ void IMAPSession::applyCapabilities(IndexSet * capabilities) mIsGmail = true; } if (capabilities->containsIndex(IMAPCapabilityIdle)) { + LOCK(); mIdleEnabled = true; + UNLOCK(); } if (capabilities->containsIndex(IMAPCapabilityCondstore)) { mCondstoreEnabled = true; @@ -3940,7 +3942,10 @@ void IMAPSession::applyCapabilities(IndexSet * capabilities) bool IMAPSession::isIdleEnabled() { - return mIdleEnabled; + LOCK(); + bool idleEnabled = mIdleEnabled; + UNLOCK(); + return idleEnabled; } bool IMAPSession::isXListEnabled() |