[evolution-data-server] [IMAPx] Do not block GetMessage requests for different messages



commit 89bf26056fab62ab7ffefc6696cd160902932624
Author: Milan Crha <mcrha redhat com>
Date:   Thu Aug 20 16:17:08 2015 +0200

    [IMAPx] Do not block GetMessage requests for different messages
    
    As it was before, one GetMessage job could block any other, even if
    the two jobs were downloading different messages.

 camel/providers/imapx/camel-imapx-conn-manager.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-conn-manager.c 
b/camel/providers/imapx/camel-imapx-conn-manager.c
index 4ef48d0..e3cda41 100644
--- a/camel/providers/imapx/camel-imapx-conn-manager.c
+++ b/camel/providers/imapx/camel-imapx-conn-manager.c
@@ -874,6 +874,7 @@ camel_imapx_conn_manager_disconnect_sync (CamelIMAPXConnManager *conn_man,
 
 static gboolean
 imapx_conn_manager_should_wait_for (CamelIMAPXConnManager *conn_man,
+                                   CamelIMAPXJob *new_job,
                                    CamelIMAPXJob *queued_job)
 {
        guint32 job_kind;
@@ -881,6 +882,9 @@ imapx_conn_manager_should_wait_for (CamelIMAPXConnManager *conn_man,
        g_return_val_if_fail (CAMEL_IS_IMAPX_CONN_MANAGER (conn_man), FALSE);
        g_return_val_if_fail (queued_job != NULL, FALSE);
 
+       if (camel_imapx_job_get_kind (new_job) == CAMEL_IMAPX_JOB_GET_MESSAGE)
+               return FALSE;
+
        job_kind = camel_imapx_job_get_kind (queued_job);
 
        /* List jobs with high priority. */
@@ -927,7 +931,7 @@ camel_imapx_conn_manager_run_job_sync (CamelIMAPXConnManager *conn_man,
 
                matches = camel_imapx_job_matches (job, queued_job);
                if (matches || (finish_before_job && finish_before_job (job, queued_job)) ||
-                   imapx_conn_manager_should_wait_for (conn_man, queued_job)) {
+                   imapx_conn_manager_should_wait_for (conn_man, job, queued_job)) {
                        camel_imapx_job_ref (queued_job);
 
                        JOB_QUEUE_UNLOCK (conn_man);


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