[evolution-data-server/gnome-3-16] Bug 720197 - [IMAPx] Indefinite waiting for message download
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/gnome-3-16] Bug 720197 - [IMAPx] Indefinite waiting for message download
- Date: Tue, 26 May 2015 20:43:33 +0000 (UTC)
commit b425140c0dbc3319fe2494a9af47685e1cb50771
Author: Milan Crha <mcrha redhat com>
Date: Tue May 26 22:41:17 2015 +0200
Bug 720197 - [IMAPx] Indefinite waiting for message download
camel/providers/imapx/camel-imapx-server.c | 21 +++++++++++++++++++++
1 files changed, 21 insertions(+), 0 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 1922e70..565a642 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -7770,6 +7770,27 @@ imapx_abort_all_commands (CamelIMAPXServer *is,
}
camel_imapx_command_queue_free (queue);
+
+ QUEUE_LOCK (is);
+
+ /* Abort also any pending jobs which are not in the command queues yet */
+ if (!g_queue_is_empty (&is->jobs)) {
+ GList *jobs, *iter;
+
+ jobs = g_list_copy (g_queue_peek_head_link (&is->jobs));
+ g_list_foreach (jobs, (GFunc) camel_imapx_job_ref, NULL);
+
+ for (iter = jobs; iter != NULL; iter = g_list_next (iter)) {
+ CamelIMAPXJob *job = iter->data;
+
+ camel_imapx_job_take_error (job, g_error_copy (error));
+ camel_imapx_job_done (job);
+ }
+
+ g_list_free_full (jobs, (GDestroyNotify) camel_imapx_job_unref);
+ }
+
+ QUEUE_UNLOCK (is);
}
/* ********************************************************************** */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]