aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog3
-rw-r--r--camel/camel.c20
2 files changed, 13 insertions, 10 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 787f16f41e..d04a0e4085 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,8 @@
2002-08-05 Jeffrey Stedfast <fejj@ximian.com>
+ * camel.c (camel_init): Always set a g_atexit handler to
+ flush/save the camel-certdb.
+
* providers/imap/camel-imap-store.c (get_folder_info_online): If
we are asking for the toplevel folders, use the IMAP store's
namespace as the toplevel folder rather than an empty
diff --git a/camel/camel.c b/camel/camel.c
index 7b250a14b1..c62656de42 100644
--- a/camel/camel.c
+++ b/camel/camel.c
@@ -41,15 +41,16 @@
gboolean camel_verbose_debug = FALSE;
-#ifdef HAVE_NSS
static void
camel_shutdown (void)
{
CamelCertDB *certdb;
+#ifdef HAVE_NSS
NSS_Shutdown ();
PR_Cleanup ();
+#endif /* HAVE_NSS */
certdb = camel_certdb_get_default ();
if (certdb) {
@@ -57,7 +58,6 @@ camel_shutdown (void)
camel_object_unref (certdb);
}
}
-#endif /* HAVE_NSS */
gint
camel_init (const char *configdir, gboolean nss_init)
@@ -75,10 +75,10 @@ camel_init (const char *configdir, gboolean nss_init)
if (getenv ("CAMEL_VERBOSE_DEBUG"))
camel_verbose_debug = TRUE;
-
+
/* initialise global camel_object_type */
camel_object_get_type();
-
+
camel_mime_utils_init();
#ifdef HAVE_NSS
@@ -95,13 +95,11 @@ camel_init (const char *configdir, gboolean nss_init)
NSS_SetDomesticPolicy ();
- g_atexit (camel_shutdown);
+ SSL_OptionSetDefault (SSL_ENABLE_SSL2, PR_TRUE);
+ SSL_OptionSetDefault (SSL_ENABLE_SSL3, PR_TRUE);
+ SSL_OptionSetDefault (SSL_ENABLE_TLS, PR_TRUE);
+ SSL_OptionSetDefault (SSL_V2_COMPATIBLE_HELLO, PR_TRUE /* maybe? */);
}
-
- SSL_OptionSetDefault (SSL_ENABLE_SSL2, PR_TRUE);
- SSL_OptionSetDefault (SSL_ENABLE_SSL3, PR_TRUE);
- SSL_OptionSetDefault (SSL_ENABLE_TLS, PR_TRUE);
- SSL_OptionSetDefault (SSL_V2_COMPATIBLE_HELLO, PR_TRUE /* maybe? */);
#endif /* HAVE_NSS */
path = g_strdup_printf ("%s/camel-cert.db", configdir);
@@ -117,5 +115,7 @@ camel_init (const char *configdir, gboolean nss_init)
camel_object_unref (certdb);
+ g_atexit (camel_shutdown);
+
return 0;
}