[evolution-data-server] Bug #693101 - IMAPx can vanish and redownload folder summary
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Bug #693101 - IMAPx can vanish and redownload folder summary
- Date: Mon, 18 Feb 2013 14:27:56 +0000 (UTC)
commit ffb11c066e75b97daee3da223653f946d9961e7b
Author: Milan Crha <mcrha redhat com>
Date: Mon Feb 18 15:27:27 2013 +0100
Bug #693101 - IMAPx can vanish and redownload folder summary
camel/camel-imapx-command.c | 6 ++++++
camel/camel-imapx-job.c | 11 +++++++++++
camel/camel-imapx-job.h | 1 +
camel/camel-imapx-server.c | 2 +-
4 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-imapx-command.c b/camel/camel-imapx-command.c
index de1de70..e1ebf00 100644
--- a/camel/camel-imapx-command.c
+++ b/camel/camel-imapx-command.c
@@ -581,6 +581,8 @@ gboolean
camel_imapx_command_set_error_if_failed (CamelIMAPXCommand *ic,
GError **error)
{
+ CamelIMAPXJob *job;
+
g_return_val_if_fail (CAMEL_IS_IMAPX_COMMAND (ic), FALSE);
if (ic->status != NULL && ic->status->result != IMAPX_OK) {
@@ -595,6 +597,10 @@ camel_imapx_command_set_error_if_failed (CamelIMAPXCommand *ic,
return TRUE;
}
+ job = camel_imapx_command_get_job (ic);
+ if (job && g_cancellable_set_error_if_cancelled (camel_imapx_job_get_cancellable (job), error))
+ return TRUE;
+
return FALSE;
}
diff --git a/camel/camel-imapx-job.c b/camel/camel-imapx-job.c
index 244afcd..a91e0ae 100644
--- a/camel/camel-imapx-job.c
+++ b/camel/camel-imapx-job.c
@@ -337,3 +337,14 @@ camel_imapx_job_set_folder (CamelIMAPXJob *job,
g_mutex_unlock (&real_job->folder_lock);
}
+GCancellable *
+camel_imapx_job_get_cancellable (CamelIMAPXJob *job)
+{
+ CamelIMAPXRealJob *real_job;
+
+ g_return_val_if_fail (CAMEL_IS_IMAPX_JOB (job), NULL);
+
+ real_job = (CamelIMAPXRealJob *) job;
+
+ return real_job->cancellable;
+}
diff --git a/camel/camel-imapx-job.h b/camel/camel-imapx-job.h
index 9b12fdb..a6fbec8 100644
--- a/camel/camel-imapx-job.h
+++ b/camel/camel-imapx-job.h
@@ -80,6 +80,7 @@ gboolean camel_imapx_job_has_folder (CamelIMAPXJob *job,
CamelFolder * camel_imapx_job_ref_folder (CamelIMAPXJob *job);
void camel_imapx_job_set_folder (CamelIMAPXJob *job,
CamelFolder *folder);
+GCancellable * camel_imapx_job_get_cancellable (CamelIMAPXJob *job);
G_END_DECLS
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 33d5618..6a60929 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -6683,7 +6683,7 @@ cancel_all_jobs (CamelIMAPXServer *is,
/* Send a NULL GError since we already cancelled
* the job and we're not interested in individual
* command errors. */
- ic->complete (is, ic, NULL, NULL);
+ ic->complete (is, ic, camel_imapx_job_get_cancellable (job), NULL);
}
camel_imapx_command_queue_free (queue);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]