[evolution-data-server/f19] evolution-data-server-3.8.0-imapx-stuck-get-message.patch
Matthew Barnes
mbarnes at fedoraproject.org
Mon Apr 8 20:25:21 UTC 2013
commit 7ae6388644c0858d36743f5aaf192cc9027897bd
Author: Matthew Barnes <mbarnes at redhat.com>
Date: Mon Apr 8 16:06:43 2013 -0400
evolution-data-server-3.8.0-imapx-stuck-get-message.patch
...data-server-3.8.0-imapx-stuck-get-message.patch | 87 ++++++++++++++++++++
evolution-data-server.spec | 10 ++-
2 files changed, 96 insertions(+), 1 deletions(-)
---
diff --git a/evolution-data-server-3.8.0-imapx-stuck-get-message.patch b/evolution-data-server-3.8.0-imapx-stuck-get-message.patch
new file mode 100644
index 0000000..329c614
--- /dev/null
+++ b/evolution-data-server-3.8.0-imapx-stuck-get-message.patch
@@ -0,0 +1,87 @@
+diff -up evolution-data-server-3.8.0/camel/camel-imapx-server.c.imapx-stuck-get-message evolution-data-server-3.8.0/camel/camel-imapx-server.c
+--- evolution-data-server-3.8.0/camel/camel-imapx-server.c.imapx-stuck-get-message 2013-03-17 08:46:02.000000000 -0400
++++ evolution-data-server-3.8.0/camel/camel-imapx-server.c 2013-04-08 16:02:03.144577398 -0400
+@@ -7129,8 +7129,6 @@ imapx_server_finalize (GObject *object)
+
+ g_rec_mutex_clear (&is->queue_lock);
+ g_mutex_clear (&is->select_lock);
+- g_mutex_clear (&is->fetch_mutex);
+- g_cond_clear (&is->fetch_cond);
+
+ camel_folder_change_info_free (is->changes);
+
+@@ -7257,9 +7255,6 @@ camel_imapx_server_init (CamelIMAPXServe
+ is->expunged = NULL;
+ is->changes = camel_folder_change_info_new ();
+ is->parser_quit = FALSE;
+-
+- g_mutex_init (&is->fetch_mutex);
+- g_cond_init (&is->fetch_cond);
+ }
+
+ CamelIMAPXServer *
+@@ -7389,32 +7384,16 @@ imapx_server_get_message (CamelIMAPXServ
+ QUEUE_LOCK (is);
+
+ if ((job = imapx_is_job_in_queue (is, folder, IMAPX_JOB_GET_MESSAGE, uid))) {
++ /* Promote the existing GET_MESSAGE
++ * job's priority if ours is higher. */
+ if (pri > job->pri)
+ job->pri = pri;
+
+- /* Wait for the job to finish. This would be so much nicer if
+- * we could just use the queue lock with a GCond, but instead
+- * we have to use a GMutex. I miss the kernel waitqueues. */
+- do {
+- gint this;
+-
+- g_mutex_lock (&is->fetch_mutex);
+- this = is->fetch_count;
+-
+- QUEUE_UNLOCK (is);
+-
+- while (is->fetch_count == this)
+- g_cond_wait (&is->fetch_cond, &is->fetch_mutex);
+-
+- g_mutex_unlock (&is->fetch_mutex);
+-
+- QUEUE_LOCK (is);
+-
+- } while (imapx_is_job_in_queue (is, folder,
+- IMAPX_JOB_GET_MESSAGE, uid));
+-
+ QUEUE_UNLOCK (is);
+
++ /* Wait for the job to finish. */
++ camel_imapx_job_wait (job);
++
+ stream = camel_data_cache_get (
+ ifolder->cache, "cur", uid, error);
+ if (stream == NULL)
+@@ -7464,11 +7443,6 @@ imapx_server_get_message (CamelIMAPXServ
+
+ camel_imapx_job_unref (job);
+
+- g_mutex_lock (&is->fetch_mutex);
+- is->fetch_count++;
+- g_cond_broadcast (&is->fetch_cond);
+- g_mutex_unlock (&is->fetch_mutex);
+-
+ return stream;
+ }
+
+diff -up evolution-data-server-3.8.0/camel/camel-imapx-server.h.imapx-stuck-get-message evolution-data-server-3.8.0/camel/camel-imapx-server.h
+--- evolution-data-server-3.8.0/camel/camel-imapx-server.h.imapx-stuck-get-message 2013-03-17 08:46:02.000000000 -0400
++++ evolution-data-server-3.8.0/camel/camel-imapx-server.h 2013-04-08 16:01:10.623480596 -0400
+@@ -159,11 +159,6 @@ struct _CamelIMAPXServer {
+ gboolean use_idle;
+
+ gboolean use_qresync;
+-
+- /* used to synchronize duplicate get_message requests */
+- GCond fetch_cond;
+- GMutex fetch_mutex;
+- gint fetch_count;
+ };
+
+ struct _CamelIMAPXServerClass {
diff --git a/evolution-data-server.spec b/evolution-data-server.spec
index 2846d9b..9fe146c 100644
--- a/evolution-data-server.spec
+++ b/evolution-data-server.spec
@@ -27,7 +27,7 @@
Name: evolution-data-server
Version: 3.8.0
-Release: 1%{?dist}
+Release: 2%{?dist}
Group: System Environment/Libraries
Summary: Backend data server for Evolution
License: LGPLv2+
@@ -43,6 +43,9 @@ Obsoletes: evolution-webcal < 2.24.0
# RH bug #243296
Patch01: evolution-data-server-1.11.5-fix-64bit-acinclude.patch
+# gnome-3-8 commit: daf4b3e
+Patch02: evolution-data-server-3.8.0-imapx-stuck-get-message.patch
+
### Build Dependencies ###
BuildRequires: libdb-devel
@@ -118,6 +121,7 @@ This package contains developer documentation for %{name}.
%setup -q
%patch01 -p1 -b .fix-64bit-acinclude
+%patch02 -p1 -b .imapx-stuck-get-message
mkdir -p krb5-fakeprefix/include
mkdir -p krb5-fakeprefix/lib
@@ -366,6 +370,10 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &>/dev/null || :
%{_datadir}/gtk-doc/html/libedataserver
%changelog
+* Mon Apr 08 2013 Matthew Barnes <mbarnes at redhat.com> - 3.8.0-2
+- Add patch to (hopefully) fix stuck message retrievals in IMAPX.
+ (evolution-data-server-3.8.0-imapx-stuck-get-message.patch)
+
* Mon Mar 25 2013 Milan Crha <mcrha at redhat.com> - 3.8.0-1
- Update to 3.8.0
More information about the scm-commits
mailing list