Re: [evolution-patches] partial fix for #60889 (and other spurious behavior possibly)



doh, actually this isn't enough.  all db->get calls fail when DB_THREAD
is used if you don't specify where the memory for the dbt should come
from.  fun.

improved patch attached.

Chris

On Mon, 2004-08-16 at 13:48 -0500, Hans Petter Jansson wrote:
> On Mon, 2004-08-16 at 09:33 -0700, Chris Toshok wrote:
> > Turns out libdb has a flag you can pass to db->open that should enable
> > some threadsafe behavior.
> 
> So we're actually making concurrent DB calls?
> 
> Patch looks good in either case.
> 
> --
> Hans Petter

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.187
diff -u -p -r1.187 ChangeLog
--- ChangeLog	13 Aug 2004 14:51:10 -0000	1.187
+++ ChangeLog	16 Aug 2004 20:59:34 -0000
@@ -1,3 +1,17 @@
+2004-08-16  Chris Toshok  <toshok ximian com>
+
+	[ part of fix for #60889 ]
+	* backends/file/e-book-backend-file.c
+	(e_book_backend_file_load_source): add DB_THREAD flag to all calls
+	to db->open.
+	(string_to_dbt): set dbt->flags to DB_DBT_USERMEM.
+	(e_book_backend_file_modify_contact): set dbt->flags to
+	DB_DBT_MALLOC and free the dbt's data when we're done.
+	(e_book_backend_file_get_contact): same.
+	(book_view_thread): same.
+	(e_book_backend_file_changes_foreach_key): same.
+	(e_book_backend_file_maybe_upgrade_db): same.
+	
 2004-08-13  Sivaiah Nallagatla <snallagatla novell com>
 
 	* backends/groupwise/e-book-backend-groupwise.c 


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