From 3fc6c32bede01e02b2ac4541c952f37dbad511b3 Mon Sep 17 00:00:00 2001 From: Wilmer van der Gaast Date: Sat, 16 Oct 2010 15:58:21 -0700 Subject: Stop calling nogaim_init() on every incoming connection (unless we're using libpurple). This was leaking memory and indirectly caused the bug fixed by the previous revision. --- unix.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'unix.c') diff --git a/unix.c b/unix.c index ad21c716..07215c07 100644 --- a/unix.c +++ b/unix.c @@ -73,6 +73,13 @@ int main( int argc, char *argv[] ) b_main_init(); + /* libpurple doesn't like fork()s after initializing itself, so if + we use it, do this init a little later (in case we're running in + ForkDaemon mode). */ +#ifndef WITH_PURPLE + nogaim_init(); +#endif + /* 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 -- cgit v1.2.3