[Asterisk-cvs] asterisk/pbx pbx_gtkconsole.c,1.14,1.15 pbx_spool.c,1.15,1.16 pbx_wilcalu.c,1.16,1.17

markster at lists.digium.com markster at lists.digium.com
Sun Aug 8 13:29:03 CDT 2004


Update of /usr/cvsroot/asterisk/pbx
In directory localhost.localdomain:/tmp/cvs-serv18773/pbx

Modified Files:
	pbx_gtkconsole.c pbx_spool.c pbx_wilcalu.c 
Log Message:
Merge BSD stack size work (bug #2067)


Index: pbx_gtkconsole.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_gtkconsole.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- pbx_gtkconsole.c	14 Jul 2004 13:57:15 -0000	1.14
+++ pbx_gtkconsole.c	8 Aug 2004 17:15:02 -0000	1.15
@@ -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 @@
 	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);

Index: pbx_spool.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_spool.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- pbx_spool.c	14 Jul 2004 13:57:15 -0000	1.15
+++ pbx_spool.c	8 Aug 2004 17:15:02 -0000	1.16
@@ -253,7 +253,7 @@
 	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 @@
 	}
 	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;
 	}

Index: pbx_wilcalu.c
===================================================================
RCS file: /usr/cvsroot/asterisk/pbx/pbx_wilcalu.c,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- pbx_wilcalu.c	14 Jul 2004 13:57:15 -0000	1.16
+++ pbx_wilcalu.c	8 Aug 2004 17:15:02 -0000	1.17
@@ -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 @@
 				/* 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 @@
 	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 @@
 		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 @@
 			return 0;
 		}
 	}
-	pthread_create(&autodialer_thread, NULL, autodial, NULL);
+	ast_pthread_create(&autodialer_thread, NULL, autodial, NULL);
 	return 0;
 }
 




More information about the svn-commits mailing list