aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_mixmonitor.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-24 18:30:19 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-05-24 18:30:19 +0000
commita42bc96f14e6c4c6c8fe8e7c743df555036e885b (patch)
tree86895556d8f221a39105f4398a54d612fbbd3da8 /apps/app_mixmonitor.c
parentf97bf5fd4d30bd179aac274961e7695ddc60e165 (diff)
Add a new API call for creating detached threads. Then, go replace all of the
places in the code where the same block of code for creating detached threads was replicated. (patch from bbryant) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65968 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_mixmonitor.c')
-rw-r--r--apps/app_mixmonitor.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/apps/app_mixmonitor.c b/apps/app_mixmonitor.c
index 40faee216..f29391273 100644
--- a/apps/app_mixmonitor.c
+++ b/apps/app_mixmonitor.c
@@ -229,7 +229,6 @@ static void *mixmonitor_thread(void *obj)
static void launch_monitor_thread(struct ast_channel *chan, const char *filename, unsigned int flags,
int readvol, int writevol, const char *post_process)
{
- pthread_attr_t attr;
pthread_t thread;
struct mixmonitor *mixmonitor;
char postprocess2[1024] = "";
@@ -296,10 +295,7 @@ static void launch_monitor_thread(struct ast_channel *chan, const char *filename
return;
}
- pthread_attr_init(&attr);
- pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
- ast_pthread_create_background(&thread, &attr, mixmonitor_thread, mixmonitor);
- pthread_attr_destroy(&attr);
+ ast_pthread_create_detached_background(&thread, NULL, mixmonitor_thread, mixmonitor);
}