evolution-data-server r9491 - trunk/camel



Author: msuman
Date: Mon Sep  8 03:24:31 2008
New Revision: 9491
URL: http://svn.gnome.org/viewvc/evolution-data-server?rev=9491&view=rev

Log:
Milan Crha  <mcrha redhat com> ** Part of fix for bug #328216 (Do not free default certdb itself, rather set it to NULL to not have freed pointer flying around, save certdb only if something has changed).

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

Modified: trunk/camel/camel-certdb.c
==============================================================================
--- trunk/camel/camel-certdb.c	(original)
+++ trunk/camel/camel-certdb.c	Mon Sep  8 03:24:31 2008
@@ -336,7 +336,11 @@
 	
 	g_return_val_if_fail (CAMEL_IS_CERTDB (certdb), -1);
 	g_return_val_if_fail (certdb->filename, -1);
-	
+
+	/* no change, nothing new to save, simply return success */
+	if ((certdb->flags & CAMEL_CERTDB_DIRTY) == 0)
+		return 0;
+
 	filename = alloca (strlen (certdb->filename) + 4);
 	sprintf (filename, "%s~", certdb->filename);
 	

Modified: trunk/camel/camel.c
==============================================================================
--- trunk/camel/camel.c	(original)
+++ trunk/camel/camel.c	Mon Sep  8 03:24:31 2008
@@ -132,7 +132,7 @@
 	certdb = camel_certdb_get_default ();
 	if (certdb) {
 		camel_certdb_save (certdb);
-		camel_object_unref (certdb);
+		camel_certdb_set_default (NULL);
 	}
 
 	/* These next calls must come last. */



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