Trivial misc bridge code changes.

* softmix_bridge_thread() was redundantly initializing an 8K buffer.

* Promoted a debug message to a warning in multiplexed_add_or_remove().


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378858 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/78/78/1
Richard Mudgett 13 years ago
parent 63bd8de579
commit 240fab21f9

@ -290,7 +290,8 @@ static void multiplexed_add_or_remove(struct multiplexed_thread *multiplexed_thr
ao2_ref(multiplexed_thread, +1); ao2_ref(multiplexed_thread, +1);
if (ast_pthread_create(&multiplexed_thread->thread, NULL, multiplexed_thread_function, multiplexed_thread)) { if (ast_pthread_create(&multiplexed_thread->thread, NULL, multiplexed_thread_function, multiplexed_thread)) {
ao2_ref(multiplexed_thread, -1); ao2_ref(multiplexed_thread, -1);
ast_debug(1, "Failed to create an actual thread for multiplexed thread '%p', trying next time\n", multiplexed_thread); ast_log(LOG_WARNING, "Failed to create the bridge thread for multiplexed thread '%p', trying next time\n",
multiplexed_thread);
} }
} else if (!multiplexed_thread->service_count && multiplexed_thread->thread != AST_PTHREADT_NULL) { } else if (!multiplexed_thread->service_count && multiplexed_thread->thread != AST_PTHREADT_NULL) {
thread = multiplexed_thread->thread; thread = multiplexed_thread->thread;

@ -750,7 +750,7 @@ static int softmix_bridge_thread(struct ast_bridge *bridge)
struct softmix_bridge_data *softmix_data = bridge->bridge_pvt; struct softmix_bridge_data *softmix_data = bridge->bridge_pvt;
struct ast_timer *timer; struct ast_timer *timer;
struct softmix_translate_helper trans_helper; struct softmix_translate_helper trans_helper;
int16_t buf[MAX_DATALEN] = { 0, }; int16_t buf[MAX_DATALEN];
unsigned int stat_iteration_counter = 0; /* counts down, gather stats at zero and reset. */ unsigned int stat_iteration_counter = 0; /* counts down, gather stats at zero and reset. */
int timingfd; int timingfd;
int update_all_rates = 0; /* set this when the internal sample rate has changed */ int update_all_rates = 0; /* set this when the internal sample rate has changed */

Loading…
Cancel
Save