[evolution-data-server/gnome-3-8] camel_imapx_command_set_error_if_failed() minor cleanup.



commit d68064714ee3d6e2f5bceaccaba22b1dbc3cd30c
Author: Matthew Barnes <mbarnes redhat com>
Date:   Tue May 21 14:32:44 2013 -0400

    camel_imapx_command_set_error_if_failed() minor cleanup.
    
    (cherry picked from commit f6de223967143aae8732bf88a7643bcd49eae27a)

 camel/camel-imapx-command.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/camel/camel-imapx-command.c b/camel/camel-imapx-command.c
index bd42ee7..efe689a 100644
--- a/camel/camel-imapx-command.c
+++ b/camel/camel-imapx-command.c
@@ -582,6 +582,7 @@ camel_imapx_command_set_error_if_failed (CamelIMAPXCommand *ic,
                                          GError **error)
 {
        CamelIMAPXJob *job;
+       GCancellable *cancellable = NULL;
 
        g_return_val_if_fail (CAMEL_IS_IMAPX_COMMAND (ic), FALSE);
 
@@ -610,10 +611,10 @@ camel_imapx_command_set_error_if_failed (CamelIMAPXCommand *ic,
        }
 
        job = camel_imapx_command_get_job (ic);
-       if (job && g_cancellable_set_error_if_cancelled (camel_imapx_job_get_cancellable (job), error))
-               return TRUE;
+       if (job != NULL)
+               cancellable = camel_imapx_job_get_cancellable (job);
 
-       return FALSE;
+       return g_cancellable_set_error_if_cancelled (cancellable, error);
 }
 
 CamelIMAPXCommandQueue *


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