commit fb1155139928f18cc6daf150303b779263529145
parent 41eb0c5361b7412b434b9645b4c6602e51ee67cc
Author: Colin Leroy <colin@colino.net>
Date: Wed, 26 Nov 2008 11:59:59 +0000
2008-11-26 [colin] 3.6.1cvs44
* src/main.c
* src/common/claws.c
* src/common/ssl.c
Make sure libgcrypt's threading is initialised
before gnutls. See also old bug 1539.
Diffstat:
6 files changed, 18 insertions(+), 15 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,11 @@
+2008-11-26 [colin] 3.6.1cvs44
+
+ * src/main.c
+ * src/common/claws.c
+ * src/common/ssl.c
+ Make sure libgcrypt's threading is initialised
+ before gnutls. See also old bug 1539.
+
2008-11-26 [colin] 3.6.1cvs43
* src/imap.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3625,3 +3625,4 @@
( cvs diff -u -r 1.382.2.487 -r 1.382.2.488 src/compose.c; ) > 3.6.1cvs41.patchset
( cvs diff -u -r 1.49.2.121 -r 1.49.2.122 src/procmime.c; ) > 3.6.1cvs42.patchset
( cvs diff -u -r 1.179.2.236 -r 1.179.2.237 src/imap.c; cvs diff -u -r 1.101.2.57 -r 1.101.2.58 src/news.c; cvs diff -u -r 1.1.4.105 -r 1.1.4.106 src/etpan/imap-thread.c; ) > 3.6.1cvs43.patchset
+( cvs diff -u -r 1.115.2.215 -r 1.115.2.216 src/main.c; cvs diff -u -r 1.1.2.5 -r 1.1.2.6 src/common/claws.c; cvs diff -u -r 1.9.2.35 -r 1.9.2.36 src/common/ssl.c; ) > 3.6.1cvs44.patchset
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=6
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=43
+EXTRA_VERSION=44
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/common/claws.c b/src/common/claws.c
@@ -91,6 +91,9 @@ gboolean claws_init(int *argc, char ***argv)
if (claws_initialized)
return TRUE;
+#ifdef USE_GNUTLS
+ ssl_init();
+#endif
startup_dir = g_get_current_dir();
parse_parameter(argc, argv);
@@ -115,10 +118,6 @@ gboolean claws_init(int *argc, char ***argv)
srand((gint) time(NULL));
-#ifdef USE_GNUTLS
- ssl_init();
-#endif
-
claws_initialized = TRUE;
return TRUE;
diff --git a/src/common/ssl.c b/src/common/ssl.c
@@ -26,6 +26,10 @@
#include <glib.h>
#include <glib/gi18n.h>
+#include <errno.h>
+#include <pthread.h>
+#include <gcrypt.h>
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
#include "claws.h"
#include "utils.h"
@@ -148,6 +152,7 @@ const gchar *claws_ssl_get_cert_dir(void)
void ssl_init(void)
{
+ gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
#ifdef HAVE_LIBETPAN
mailstream_gnutls_init_not_required();
#endif
diff --git a/src/main.c b/src/main.c
@@ -43,11 +43,6 @@
#ifdef HAVE_LIBSM
#include <X11/SM/SMlib.h>
#endif
-#ifdef USE_GNUTLS
-#include <pthread.h>
-#include <gcrypt.h>
-GCRY_THREAD_OPTION_PTHREAD_IMPL;
-#endif
#include "wizard.h"
#ifdef HAVE_STARTUP_NOTIFICATION
@@ -1053,7 +1048,6 @@ int main(int argc, char *argv[])
GtkUIManager *gui_manager = NULL;
GSList *plug_list = NULL;
gboolean never_ran = FALSE;
-
START_TIMING("startup");
sc_starting = TRUE;
@@ -1444,10 +1438,6 @@ int main(int argc, char *argv[])
if (claws_crashed())
main_window_popup(mainwin);
-#ifdef USE_GNUTLS
- gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
-#endif
-
#ifdef HAVE_LIBETPAN
imap_main_init(prefs_common.skip_ssl_cert_check);
imap_main_set_timeout(prefs_common.io_timeout_secs);