From 764c7d1009feda7db971ea7ac6bcb2a4acef0efc Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Sun, 3 Feb 2008 22:30:03 +0100 Subject: OTR support, first checkin --- unix.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'unix.c') diff --git a/unix.c b/unix.c index 0aaf505a..63ef7fae 100644 --- a/unix.c +++ b/unix.c @@ -26,6 +26,7 @@ #include "bitlbee.h" #include "commands.h" #include "crypting.h" +#include "otr.h" #include "protocols/nogaim.h" #include "help.h" #include "ipc.h" @@ -53,6 +54,7 @@ int main( int argc, char *argv[], char **envp ) b_main_init(); nogaim_init(); + otr_init(); srand( time( NULL ) ^ getpid() ); global.helpfile = g_strdup( HELP_FILE ); -- cgit v1.2.3 From ba5add72f824504a21eb780cae638c3ea2166ba0 Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Sun, 17 Feb 2008 02:39:39 +0100 Subject: explicitly initialize ssl in order to avoid gnutls and libotr fighting over the global state of libgcrypt --- unix.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'unix.c') 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 #include #include @@ -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() ); -- cgit v1.2.3 From 823de9d44f262ea2364ac8ec6a1e18e0f7dab658 Mon Sep 17 00:00:00 2001 From: Sven Moritz Hallberg Date: Thu, 12 Mar 2009 20:10:06 +0100 Subject: commit updates by ashish shukla --- unix.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'unix.c') diff --git a/unix.c b/unix.c index 6fc85dbb..8a828eec 100644 --- a/unix.c +++ b/unix.c @@ -55,13 +55,13 @@ int main( int argc, char *argv[] ) 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(); + /* 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() ); global.helpfile = g_strdup( HELP_FILE ); @@ -222,5 +222,3 @@ double gettime() gettimeofday( time, 0 ); return( (double) time->tv_sec + (double) time->tv_usec / 1000000 ); } - - -- cgit v1.2.3