evolution-data-server r9764 - trunk/camel



Author: sragavan
Date: Wed Nov 19 05:07:56 2008
New Revision: 9764
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9764&view=rev

Log:
2008-11-19  Srinivasa Ragavan  <sragavan novell com>

	** Fix for bug #558883

	* camel/camel-db.c: Remove the redundant transaction lock.




Modified:
   trunk/camel/ChangeLog
   trunk/camel/camel-db.c

Modified: trunk/camel/camel-db.c
==============================================================================
--- trunk/camel/camel-db.c	(original)
+++ trunk/camel/camel-db.c	Wed Nov 19 05:07:56 2008
@@ -190,7 +190,8 @@
 {
 	if (!cdb)
 		return -1;
-	g_static_rec_mutex_lock (&trans_lock);
+	if (g_getenv("SQLITE_TRANSLOCK"))
+		g_static_rec_mutex_lock (&trans_lock);
 
 	g_mutex_lock (cdb->lock);
 	return (cdb_sql_exec (cdb->db, "BEGIN", ex));
@@ -207,7 +208,8 @@
 	ret = cdb_sql_exec (cdb->db, "COMMIT", ex);
 	END;
 	g_mutex_unlock (cdb->lock);
-	g_static_rec_mutex_unlock (&trans_lock);
+	if (g_getenv("SQLITE_TRANSLOCK"))
+		g_static_rec_mutex_unlock (&trans_lock);
 
 	CAMEL_DB_RELEASE_SQLITE_MEMORY;
 	
@@ -221,7 +223,8 @@
 	
 	ret = cdb_sql_exec (cdb->db, "ROLLBACK", ex);
 	g_mutex_unlock (cdb->lock);
-	g_static_rec_mutex_unlock (&trans_lock);	
+	if (g_getenv("SQLITE_TRANSLOCK"))
+		g_static_rec_mutex_unlock (&trans_lock);	
 	CAMEL_DB_RELEASE_SQLITE_MEMORY;
 	
 	return ret;



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