aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-08 17:15:02 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2004-08-08 17:15:02 +0000
commit28a366ed7268db8428ee2d78fb44f29c78067dd9 (patch)
treee2443cc3c4c3b09b706e611a61f475c509778c57 /pbx
parentd85f0f5c24a90dab01664373615a8e243e6f5851 (diff)
Merge BSD stack size work (bug #2067)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3596 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx')
-rwxr-xr-xpbx/pbx_gtkconsole.c3
-rwxr-xr-xpbx/pbx_spool.c4
-rwxr-xr-xpbx/pbx_wilcalu.c9
3 files changed, 9 insertions, 7 deletions
diff --git a/pbx/pbx_gtkconsole.c b/pbx/pbx_gtkconsole.c
index 852daf9a1..ce8189a6a 100755
--- a/pbx/pbx_gtkconsole.c
+++ b/pbx/pbx_gtkconsole.c
@@ -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);
diff --git a/pbx/pbx_spool.c b/pbx/pbx_spool.c
index 2105ffe7b..fd51926b0 100755
--- a/pbx/pbx_spool.c
+++ b/pbx/pbx_spool.c
@@ -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;
}
diff --git a/pbx/pbx_wilcalu.c b/pbx/pbx_wilcalu.c
index b3be54461..b2f61454f 100755
--- a/pbx/pbx_wilcalu.c
+++ b/pbx/pbx_wilcalu.c
@@ -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;
}