Merge BSD stack size work (bug #2067)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-08-08 17:15:02 +00:00
parent 916566ac11
commit 7acee329e1
29 changed files with 101 additions and 58 deletions

View File

@@ -23,6 +23,7 @@
#include <asterisk/module.h>
#include <asterisk/pbx.h>
#include <asterisk/options.h>
#include <asterisk/utils.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <errno.h>
@@ -942,7 +943,7 @@ static int restart_monitor(void)
vpb_put_event(&e);
} else {
/* Start a new monitor */
int pid = pthread_create(&monitor_thread, NULL, do_monitor, NULL);
int pid = ast_pthread_create(&monitor_thread, NULL, do_monitor, NULL);
if (option_verbose > 3)
ast_verbose(VERBOSE_PREFIX_4 "Created new monitor thread %d\n",pid);
if (pid < 0) {
@@ -1287,7 +1288,7 @@ static int vpb_call(struct ast_channel *ast, char *dest, int timeout)
}
if (!p->readthread){
pthread_create(&p->readthread, NULL, do_chanreads, (void *)p);
ast_pthread_create(&p->readthread, NULL, do_chanreads, (void *)p);
}
tmp = ast_mutex_unlock(&p->lock);
@@ -1423,7 +1424,7 @@ static int vpb_answer(struct ast_channel *ast)
if( !p->readthread ){
// res = ast_mutex_unlock(&p->lock);
// ast_verbose("%s: unLOCKING in answer [%d]\n", p->dev,res);
pthread_create(&p->readthread, NULL, do_chanreads, (void *)p);
ast_pthread_create(&p->readthread, NULL, do_chanreads, (void *)p);
} else {
if(option_verbose>3)
ast_verbose(VERBOSE_PREFIX_4 "%s: Record thread already running!!\n",p->dev);