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/branches/1.4@65901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Olle Johansson
2007-05-24 15:26:10 +00:00
parent e8addde3f1
commit 4eab565b25

View 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"
@@ -1805,6 +1809,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);