summaryrefslogtreecommitdiff
path: root/pbx.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2004-04-02 07:24:33 +0000
committerMark Spencer <markster@digium.com>2004-04-02 07:24:33 +0000
commita925c1b306effc327897b8190eeee9411b0cb9ca (patch)
tree633ce333ef496683e589e288ea8981458529515a /pbx.c
parent7f6b9ccb5bee2ac26b833ecca0dec23d1893b231 (diff)
Update security document, work on threading with pbx.c and small SIP fixes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2600 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'pbx.c')
-rwxr-xr-xpbx.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pbx.c b/pbx.c
index b837af4f0..12adae667 100755
--- a/pbx.c
+++ b/pbx.c
@@ -4044,7 +4044,10 @@ int ast_pbx_outgoing_app(char *type, int format, void *data, int timeout, char *
if (appdata)
strncpy(as->appdata, appdata, sizeof(as->appdata) - 1);
as->timeout = timeout;
- if (pthread_create(&as->p, NULL, async_wait, as)) {
+ /* Start a new thread, and get something handling this channel. */
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+ if (pthread_create(&as->p, &attr, async_wait, as)) {
ast_log(LOG_WARNING, "Failed to start async wait\n");
free(as);
ast_hangup(chan);