[evolution] Revert patch for bug #605596, it was causing crashes



commit 763b775a3c11f3a4618a53a2a7762750be9d37ad
Author: Milan Crha <mcrha redhat com>
Date:   Fri Jan 29 09:50:04 2010 +0100

    Revert patch for bug #605596, it was causing crashes

 mail/em-html-stream.c |    2 +-
 mail/em-sync-stream.c |    7 +++----
 mail/em-sync-stream.h |    1 -
 3 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c
index 0e0119a..cc3c795 100644
--- a/mail/em-html-stream.c
+++ b/mail/em-html-stream.c
@@ -124,7 +124,7 @@ static void
 em_html_stream_finalize (EMHTMLStream *emhs)
 {
 	if (emhs->html_stream) {
-		emhs->sync.in_finalize = TRUE;
+		/* set 'in finalise' flag */
 		camel_stream_close (CAMEL_STREAM (emhs));
 	}
 }
diff --git a/mail/em-sync-stream.c b/mail/em-sync-stream.c
index e7c4770..982a56c 100644
--- a/mail/em-sync-stream.c
+++ b/mail/em-sync-stream.c
@@ -127,7 +127,7 @@ emss_stream_write (CamelStream *stream, const gchar *string, gsize len)
 	if (emss->cancel)
 		return -1;
 
-	if (emss->in_finalize || mail_in_main_thread ()) {
+	if (mail_in_main_thread ()) {
 		EMSS_CLASS (emss)->sync_write (stream, string, len);
 	} else if (emss->buffer != NULL) {
 		if (len < (emss->buffer->allocated_len - emss->buffer->len))
@@ -149,7 +149,7 @@ emss_stream_flush (CamelStream *stream)
 	if (emss->cancel)
 		return -1;
 
-	if (emss->in_finalize || mail_in_main_thread ())
+	if (mail_in_main_thread ())
 		return EMSS_CLASS (emss)->sync_flush (stream);
 	else
 		emss_sync_op (emss, EMSS_FLUSH, NULL, 0);
@@ -167,7 +167,7 @@ emss_stream_close (CamelStream *stream)
 
 	emss->idle_id = 0;
 
-	if (emss->in_finalize || mail_in_main_thread ())
+	if (mail_in_main_thread ())
 		return EMSS_CLASS (emss)->sync_close (stream);
 	else
 		emss_sync_op (emss, EMSS_CLOSE, NULL, 0);
@@ -190,7 +190,6 @@ em_sync_stream_class_init (EMSyncStreamClass *class)
 static void
 em_sync_stream_finalize (EMSyncStream *emss)
 {
-	emss->in_finalize = TRUE;
 	if (emss->buffer != NULL)
 		g_string_free (emss->buffer, TRUE);
 	if (emss->idle_id)
diff --git a/mail/em-sync-stream.h b/mail/em-sync-stream.h
index 3823e82..3d74a02 100644
--- a/mail/em-sync-stream.h
+++ b/mail/em-sync-stream.h
@@ -54,7 +54,6 @@ struct _EMSyncStream {
 	GString *buffer;
 	gboolean cancel;
 	guint idle_id;
-	gboolean in_finalize;
 };
 
 struct _EMSyncStreamClass {



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