Merged revisions 65901 via svnmerge from
authorOlle Johansson <oej@edvina.net>
Thu, 24 May 2007 15:29:10 +0000 (15:29 +0000)
committerOlle Johansson <oej@edvina.net>
Thu, 24 May 2007 15:29:10 +0000 (15:29 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r65901 | oej | 2007-05-24 17:26:10 +0200 (Thu, 24 May 2007) | 2 lines

Issue 7672 - fix by zandbelt - Asterisk core dump since the GnuTLS interface did not support multithreading correctly.

........

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65904 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_gtalk.c

index 0cd2a5b..c224c1e 100644 (file)
@@ -48,6 +48,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 #include <sys/signal.h>
 #include <iksemel.h>
 
+#include <gcrypt.h>
+#include <pthread.h>
+GCRY_THREAD_OPTION_PTHREAD_IMPL;
+
 #include "asterisk/lock.h"
 #include "asterisk/channel.h"
 #include "asterisk/config.h"
@@ -1816,6 +1820,8 @@ static int gtalk_load_config(void)
 /*! \brief Load module into PBX, register channel */
 static int load_module(void)
 {
+        gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread);
+
        ASTOBJ_CONTAINER_INIT(&gtalk_list);
        if (!gtalk_load_config()) {
                ast_log(LOG_ERROR, "Unable to read config file %s. Not loading module.\n", GOOGLE_CONFIG);