evolution r36716 - branches/gnome-2-24/mail



Author: mbarnes
Date: Sun Nov  2 18:21:10 2008
New Revision: 36716
URL: http://svn.gnome.org/viewvc/evolution?rev=36716&view=rev

Log:
2008-11-02  Matthew Barnes  <mbarnes redhat com>

	** Fixes bug #557613

	* mail/em-utils.c (try_open_e_book):
	Wait for try_open_e_book_cb() to run before freeing the EFlag.
	It will run regardless of whether the EBook operation completes.



Modified:
   branches/gnome-2-24/mail/ChangeLog
   branches/gnome-2-24/mail/em-utils.c

Modified: branches/gnome-2-24/mail/em-utils.c
==============================================================================
--- branches/gnome-2-24/mail/em-utils.c	(original)
+++ branches/gnome-2-24/mail/em-utils.c	Sun Nov  2 18:21:10 2008
@@ -2081,14 +2081,14 @@
 		e_flag_timed_wait (flag, &wait);
 	}
 
-	e_flag_free (flag);
-
 	if (canceled) {
 		g_set_error (error, E_BOOK_ERROR, E_BOOK_ERROR_CANCELLED, "Operation has been canceled.");
 		e_book_cancel_async_op (book, NULL);
-		return FALSE;
 	}
 
+	e_flag_wait (flag);
+	e_flag_free (flag);
+
 	return data.result;
 }
 
@@ -2183,7 +2183,7 @@
 			stop = err && err->domain == E_BOOK_ERROR && err->code == E_BOOK_ERROR_CANCELLED;
 			mail_cancel_hook_remove(hook);
 			g_object_unref(book);
-			d(g_warning("Can't get contacts: %s", err->message));
+			g_warning("Can't get contacts: %s", err->message);
 			g_clear_error(&err);
 			continue;
 		}
@@ -2267,7 +2267,7 @@
 		    || !e_book_get_contacts(book, query, &contacts, &err)) {
 			stop = err && err->domain == E_BOOK_ERROR && err->code == E_BOOK_ERROR_CANCELLED;
 			g_object_unref(book);
-			d(g_warning("Can't get contacts: %s", err->message));
+			g_warning("Can't get contacts: %s", err->message);
 			g_clear_error(&err);
 			continue;
 		}



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