diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-02 07:24:33 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2004-04-02 07:24:33 +0000 |
commit | ae864c9a6e21d2d2d7e6292197c276cb62601414 (patch) | |
tree | 633ce333ef496683e589e288ea8981458529515a /pbx.c | |
parent | 3db2efdb0bf7c0842d28ddc67eba6bf6bef601f7 (diff) |
Update security document, work on threading with pbx.c and small SIP fixes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2600 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'pbx.c')
-rwxr-xr-x | pbx.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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); |