diff options
author | Jonathan Rose <jrose@digium.com> | 2012-03-29 19:59:30 +0000 |
---|---|---|
committer | Jonathan Rose <jrose@digium.com> | 2012-03-29 19:59:30 +0000 |
commit | d501c2ea2d56ece966b6615799dd7b66198176dd (patch) | |
tree | 33ad80dfb8a5751b7d76e748621055083315251d /main/features.c | |
parent | bf994f0e04696ba11ce0ec81df7880d61ef9c779 (diff) |
undoing 360785 due to merging mistake
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360786 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/features.c')
-rw-r--r-- | main/features.c | 20 |
1 files changed, 2 insertions, 18 deletions
diff --git a/main/features.c b/main/features.c index d23bda4a1..71be7d3f7 100644 --- a/main/features.c +++ b/main/features.c @@ -844,7 +844,6 @@ struct ast_bridge_thread_obj struct ast_bridge_config bconfig; struct ast_channel *chan; struct ast_channel *peer; - struct ast_callid *callid; /*<! callid pointer (Only used to bind thread) */ unsigned int return_to_pbx:1; }; @@ -950,12 +949,6 @@ static void *bridge_call_thread(void *data) struct ast_bridge_thread_obj *tobj = data; int res; - if (tobj->callid) { - ast_callid_threadassoc_add(tobj->callid); - /* Need to deref and set to null since ast_bridge_thread_obj has no common destructor */ - tobj->callid = ast_callid_unref(tobj->callid); - } - ast_channel_appl_set(tobj->chan, !tobj->return_to_pbx ? "Transferred Call" : "ManagerBridge"); ast_channel_data_set(tobj->chan, ast_channel_name(tobj->peer)); ast_channel_appl_set(tobj->peer, !tobj->return_to_pbx ? "Transferred Call" : "ManagerBridge"); @@ -994,23 +987,15 @@ static void *bridge_call_thread(void *data) * * Create thread and attributes, call bridge_call_thread */ -static void bridge_call_thread_launch(struct ast_bridge_thread_obj *data) +static void bridge_call_thread_launch(void *data) { pthread_t thread; pthread_attr_t attr; struct sched_param sched; - /* This needs to be unreffed once it has been associated with the new thread. */ - data->callid = ast_read_threadstorage_callid(); - pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - if (ast_pthread_create(&thread, &attr, bridge_call_thread, data)) { - /* Failed to create thread. Ditch the reference to callid. */ - ast_callid_unref(data->callid); - ast_log(LOG_ERROR, "Failed to create bridge_call_thread.\n"); - return; - } + ast_pthread_create(&thread, &attr, bridge_call_thread, data); pthread_attr_destroy(&attr); memset(&sched, 0, sizeof(sched)); pthread_setschedparam(thread, SCHED_RR, &sched); @@ -8278,4 +8263,3 @@ int ast_features_init(void) return res; } - |