[evolution-data-server] Bug 764307 - [IMAPx] Use NOTIFY only if supported and IDLE enabled



commit 6845a20f98ce655547dffafe8b1e6e57a625edd4
Author: Milan Crha <mcrha redhat com>
Date:   Fri Apr 8 09:12:12 2016 +0200

    Bug 764307 - [IMAPx] Use NOTIFY only if supported and IDLE enabled

 camel/providers/imapx/camel-imapx-server.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 0881c06..3924c83 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -3100,6 +3100,7 @@ imapx_reconnect (CamelIMAPXServer *is,
        CamelSettings *settings;
        gchar *mechanism;
        gboolean use_qresync;
+       gboolean use_idle;
        gboolean success = FALSE;
 
        store = camel_imapx_server_ref_store (is);
@@ -3120,8 +3121,8 @@ imapx_reconnect (CamelIMAPXServer *is,
        mechanism = camel_network_settings_dup_auth_mechanism (
                CAMEL_NETWORK_SETTINGS (settings));
 
-       use_qresync = camel_imapx_settings_get_use_qresync (
-               CAMEL_IMAPX_SETTINGS (settings));
+       use_qresync = camel_imapx_settings_get_use_qresync (CAMEL_IMAPX_SETTINGS (settings));
+       use_idle = camel_imapx_settings_get_use_idle (CAMEL_IMAPX_SETTINGS (settings));
 
        g_object_unref (settings);
 
@@ -3199,7 +3200,7 @@ preauthed:
        }
 
        /* Set NOTIFY options after enabling QRESYNC (if supported). */
-       if (CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, NOTIFY)) {
+       if (use_idle && CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, NOTIFY)) {
                GError *local_error = NULL;
 
                g_mutex_unlock (&is->priv->stream_lock);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]