From dcf5f55c1c44c0285bbaa977bb3714b22d530407 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Mon, 5 Aug 2002 20:04:05 +0000 Subject: Always set a g_atexit handler to flush/save the camel-certdb. 2002-08-05 Jeffrey Stedfast * camel.c (camel_init): Always set a g_atexit handler to flush/save the camel-certdb. svn path=/trunk/; revision=17700 --- camel/camel.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'camel/camel.c') 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; } -- cgit v1.2.3