mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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:
@@ -26,6 +26,7 @@
|
||||
#include <asterisk/logger.h>
|
||||
#include <asterisk/options.h>
|
||||
#include <asterisk/cli.h>
|
||||
#include <asterisk/utils.h>
|
||||
#include <stdlib.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
@@ -450,7 +451,7 @@ static int show_console(void)
|
||||
gtk_container_add(GTK_CONTAINER(window), hbox);
|
||||
gtk_window_set_title(GTK_WINDOW(window), "Asterisk Console");
|
||||
gtk_widget_grab_focus(cli);
|
||||
pthread_create(&console_thread, NULL, consolethread, NULL);
|
||||
ast_pthread_create(&console_thread, NULL, consolethread, NULL);
|
||||
/* XXX Okay, seriously fix me! XXX */
|
||||
usleep(100000);
|
||||
ast_register_verbose(verboser);
|
||||
|
@@ -253,7 +253,7 @@ static void launch_service(struct outgoing *o)
|
||||
pthread_attr_t attr;
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
if (pthread_create(&t,&attr,attempt_thread, o) == -1) {
|
||||
if (ast_pthread_create(&t,&attr,attempt_thread, o) == -1) {
|
||||
ast_log(LOG_WARNING, "Unable to create thread :(\n");
|
||||
free(o);
|
||||
}
|
||||
@@ -382,7 +382,7 @@ int load_module(void)
|
||||
}
|
||||
pthread_attr_init(&attr);
|
||||
pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
|
||||
if (pthread_create(&thread,&attr,scan_thread, NULL) == -1) {
|
||||
if (ast_pthread_create(&thread,&attr,scan_thread, NULL) == -1) {
|
||||
ast_log(LOG_WARNING, "Unable to create thread :(\n");
|
||||
return -1;
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@
|
||||
#include <asterisk/module.h>
|
||||
#include <asterisk/translate.h>
|
||||
#include <asterisk/options.h>
|
||||
#include <asterisk/utils.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
@@ -98,7 +99,7 @@ static void *autodial(void *ignore)
|
||||
/* if & then string is complete */
|
||||
if(buf[x]=='&'){
|
||||
if(NULL!=(pass=(void *)strdup(sendbuf))){
|
||||
pthread_create(&dialstring_thread, NULL, dialstring, pass);
|
||||
ast_pthread_create(&dialstring_thread, NULL, dialstring, pass);
|
||||
sendbufptr=sendbuf;
|
||||
memset(sendbuf, 0, 257);
|
||||
}
|
||||
@@ -130,7 +131,7 @@ static void *snooze_alarm(void *pass)
|
||||
struct alarm_data *data = (struct alarm_data *) pass;
|
||||
|
||||
sleep(data->snooze_len);
|
||||
pthread_create(&dialstring_thread, NULL, dialstring, data->dialstr);
|
||||
ast_pthread_create(&dialstring_thread, NULL, dialstring, data->dialstr);
|
||||
/* dialstring will free data->dialstr */
|
||||
free(pass);
|
||||
pthread_exit(NULL);
|
||||
@@ -153,7 +154,7 @@ static void set_snooze_alarm(char *dialstr, int snooze_len)
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
pass->snooze_len=snooze_len;
|
||||
pthread_create(&snooze_alarm_thread,NULL,snooze_alarm,pass);
|
||||
ast_pthread_create(&snooze_alarm_thread,NULL,snooze_alarm,pass);
|
||||
}
|
||||
|
||||
static void *dialstring(void *string)
|
||||
@@ -266,7 +267,7 @@ int load_module(void)
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
pthread_create(&autodialer_thread, NULL, autodial, NULL);
|
||||
ast_pthread_create(&autodialer_thread, NULL, autodial, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user