svn path=/trunk/; revision=9491
+2008-09-08 Milan Crha <mcrha@redhat.com>
+
+ ** Part of fix for bug #328216
+
+ * camel.c: (camel_shutdown): Do not free default certdb itself,
+ rather set it to NULL to not have freed pointer flying around.
+ * camel-certdb.c: (camel_certdb_save): Save only when changed.
+
2008-09-05 Paul Bolle <pebolle@tiscali.nl>
** Fix for bug #550412
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);
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. */