diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-07 22:38:59 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2007-06-07 22:38:59 +0000 |
commit | 8948629e106b96f9f1c9e1c78c011ab48bd60ae7 (patch) | |
tree | 3b79ba2002bb8f4c4aa569553f420572855b9fcd /channels/chan_zap.c | |
parent | 5e7bfda69d542b44be5f6484ee38e9700ffa1cbd (diff) |
Fix a couple of places that got missed in the conversion to using the new API
call for creating detached threads.
(issue #9915, reported by elguro, fixed by me)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68325 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_zap.c')
-rw-r--r-- | channels/chan_zap.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/channels/chan_zap.c b/channels/chan_zap.c index dfbfed596..12aa7a815 100644 --- a/channels/chan_zap.c +++ b/channels/chan_zap.c @@ -6938,7 +6938,6 @@ static int handle_init_event(struct zt_pvt *i, int event) { int res; pthread_t threadid; - pthread_attr_t attr; struct ast_channel *chan; /* Handle an event on a given channel for the monitor thread. */ @@ -7017,7 +7016,7 @@ static int handle_init_event(struct zt_pvt *i, int event) case SIG_SF: /* Check for callerid, digits, etc */ chan = zt_new(i, AST_STATE_RING, 0, SUB_REAL, 0, 0); - if (chan && ast_pthread_create(&threadid, &attr, ss_thread, chan)) { + if (chan && ast_pthread_create_detached(&threadid, NULL, ss_thread, chan)) { ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel); res = tone_zone_play_tone(i->subs[SUB_REAL].zfd, ZT_TONE_CONGESTION); if (res < 0) @@ -7113,7 +7112,7 @@ static int handle_init_event(struct zt_pvt *i, int event) "CID detection on channel %d\n", i->channel); chan = zt_new(i, AST_STATE_PRERING, 0, SUB_REAL, 0, 0); - if (chan && ast_pthread_create(&threadid, &attr, ss_thread, chan)) { + if (chan && ast_pthread_create_detached(&threadid, NULL, ss_thread, chan)) { ast_log(LOG_WARNING, "Unable to start simple switch thread on channel %d\n", i->channel); } } |