[evolution-data-server/gnome-3-22] Bug 772347 - [IMAPx] NOTIFY responses stuck in stream until read from it
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-22] Bug 772347 - [IMAPx] NOTIFY responses stuck in stream until read from it
- Date: Thu, 13 Oct 2016 09:35:58 +0000 (UTC)
commit 6cbf43cd7d4fa60d6565b48dc4d523dd3baaa528
Author: Milan Crha <mcrha redhat com>
Date: Thu Oct 13 11:31:56 2016 +0200
Bug 772347 - [IMAPx] NOTIFY responses stuck in stream until read from it
camel/providers/imapx/camel-imapx-server.c | 23 ++++++++++-------------
1 files changed, 10 insertions(+), 13 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index f2bd005..fe4ebd7 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -6256,23 +6256,20 @@ imapx_server_run_idle_thread_cb (gpointer user_data)
gboolean
camel_imapx_server_can_use_idle (CamelIMAPXServer *is)
{
- gboolean use_idle = FALSE;
+ gboolean use_idle;
+ CamelIMAPXSettings *settings;
g_mutex_lock (&is->priv->stream_lock);
- /* No need for IDLE if the server supports NOTIFY. */
- if (CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, NOTIFY)) {
- g_mutex_unlock (&is->priv->stream_lock);
-
- return FALSE;
- }
-
- if (CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, IDLE)) {
- CamelIMAPXSettings *settings;
+ settings = camel_imapx_server_ref_settings (is);
+ use_idle = camel_imapx_settings_get_use_idle (settings);
+ g_object_unref (settings);
- settings = camel_imapx_server_ref_settings (is);
- use_idle = camel_imapx_settings_get_use_idle (settings);
- g_object_unref (settings);
+ /* Run IDLE if the server supports NOTIFY, to have
+ a constant read on the stream, thus to be notified. */
+ if (!CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, NOTIFY) &&
+ !CAMEL_IMAPX_HAVE_CAPABILITY (is->priv->cinfo, IDLE)) {
+ use_idle = FALSE;
}
g_mutex_unlock (&is->priv->stream_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]