[evolution-data-server] imapx_command_run_sync(): Set a GError if cancelled.



commit 33e1de72498f2a51260ae5b0128f2ee6b9942472
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Dec 2 00:44:33 2011 -0600

    imapx_command_run_sync(): Set a GError if cancelled.
    
    Getting segfaults on cancellation without this...

 camel/providers/imapx/camel-imapx-server.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index c9d9ab3..9ca9623 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -2225,7 +2225,8 @@ imapx_command_run_sync (CamelIMAPXServer *is,
 	if (cancel_id > 0)
 		g_cancellable_disconnect (ic->cancellable, cancel_id);
 
-	/* XXX Should we set the command's GError here if cancelled? */
+	/* XXX Might this overwrite an existing error? */
+	g_cancellable_set_error_if_cancelled (ic->cancellable, &ic->error);
 
 	g_cond_free (ic->run_sync_cond);
 	g_mutex_free (ic->run_sync_mutex);



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