aboutsummaryrefslogtreecommitdiffstats
path: root/unix.c
diff options
context:
space:
mode:
authorSven Moritz Hallberg <sm@khjk.org>2008-02-17 02:39:39 +0100
committerSven Moritz Hallberg <sm@khjk.org>2008-02-17 02:39:39 +0100
commitba5add72f824504a21eb780cae638c3ea2166ba0 (patch)
treedb16826012c15c1fe2b682a4f3b2d514d41d7aaf /unix.c
parentfd9fa52e0014459079444bd7bfff7a40eef4e27a (diff)
explicitly initialize ssl in order to avoid gnutls and libotr fighting over the global state of libgcrypt
Diffstat (limited to 'unix.c')
-rw-r--r--unix.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/unix.c b/unix.c
index 07cb709f..cbd5c15d 100644
--- a/unix.c
+++ b/unix.c
@@ -30,6 +30,7 @@
#include "protocols/nogaim.h"
#include "help.h"
#include "ipc.h"
+#include "lib/ssl_client.h"
#include <signal.h>
#include <unistd.h>
#include <sys/time.h>
@@ -54,6 +55,12 @@ int main( int argc, char *argv[], char **envp )
b_main_init();
nogaim_init();
+ /* Ugly Note: libotr and gnutls both use libgcrypt. libgcrypt
+ has a process-global config state whose initialization happpens
+ twice if libotr and gnutls are used together. libotr installs custom
+ memory management functions for libgcrypt while our gnutls module
+ uses the defaults. Therefore we initialize OTR after SSL. *sigh* */
+ ssl_init();
otr_init();
srand( time( NULL ) ^ getpid() );