[asterisk-commits] russell: branch file/bridging r105208 - /team/file/bridging/main/bridging.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Feb 28 22:21:57 CST 2008
Author: russell
Date: Thu Feb 28 22:21:56 2008
New Revision: 105208
URL: http://svn.digium.com/view/asterisk?view=rev&rev=105208
Log:
spaces to tabs
Modified:
team/file/bridging/main/bridging.c
Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=105208&r1=105207&r2=105208
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Thu Feb 28 22:21:56 2008
@@ -433,13 +433,13 @@
if (!(bridge->technology->formats & bridge_channel->chan->readformat)) {
int best_format = ast_best_codec(bridge->technology->formats);
- /* Read format is a no go... */
+ /* Read format is a no go... */
if (option_debug) {
char codec_buf[512];
ast_getformatname_multiple(codec_buf, sizeof(codec_buf), bridge->technology->formats);
ast_log(LOG_DEBUG, "Bridge technology %s wants to read any of formats %s(%d) but channel has %s(%d)\n", bridge->technology->name, codec_buf, bridge->technology->formats, ast_getformatname(formats[0]), formats[0]);
}
- /* Switch read format to the best one chosen */
+ /* Switch read format to the best one chosen */
if (ast_set_read_format(bridge_channel->chan, best_format)) {
ast_log(LOG_WARNING, "Failed to set channel %s to read format %s(%d)\n", bridge_channel->chan->name, ast_getformatname(best_format), best_format);
return -1;
@@ -451,13 +451,13 @@
if (!(bridge->technology->formats & formats[1])) {
int best_format = ast_best_codec(bridge->technology->formats);
- /* Write format is a no go... */
+ /* Write format is a no go... */
if (option_debug) {
char codec_buf[512];
ast_getformatname_multiple(codec_buf, sizeof(codec_buf), bridge->technology->formats);
ast_log(LOG_DEBUG, "Bridge technology %s wants to write any of formats %s(%d) but channel has %s(%d)\n", bridge->technology->name, codec_buf, bridge->technology->formats, ast_getformatname(formats[1]), formats[1]);
}
- /* Switch write format to the best one chosen */
+ /* Switch write format to the best one chosen */
if (ast_set_write_format(bridge_channel->chan, best_format)) {
ast_log(LOG_WARNING, "Failed to set channel %s to write format %s(%d)\n", bridge_channel->chan->name, ast_getformatname(best_format), best_format);
return -1;
@@ -1002,23 +1002,23 @@
if (swap) {
struct ast_bridge_channel *swap_channel = NULL;
if ((swap_channel = find_bridge_channel(bridge, swap))) {
- ast_debug(1, "Removing bridge channel %p from bridge %p and setting it to a swap state\n", swap_channel, bridge);
- AST_LIST_REMOVE(&bridge->channels, swap_channel, list);
- /* Signal the bridge thread to rebuild and poke it if required */
+ ast_debug(1, "Removing bridge channel %p from bridge %p and setting it to a swap state\n", swap_channel, bridge);
+ AST_LIST_REMOVE(&bridge->channels, swap_channel, list);
+ /* Signal the bridge thread to rebuild and poke it if required */
ast_bridge_rebuild(bridge);
- ast_debug(1, "Releasing bridge lock on %p to ensure swap operation from bridge thread\n", bridge);
- ast_mutex_unlock(&bridge->lock);
- usleep(1);
- ast_mutex_lock(&bridge->lock);
- ast_debug(1, "Reacquired bridge lock on %p\n", bridge);
- ast_bridge_change_state(swap_channel, AST_BRIDGE_CHANNEL_STATE_SWAP);
- bridge_channel->state = AST_BRIDGE_CHANNEL_STATE_SWAP;
- /* We purposely unlock here to give time for the above to happen */
- ast_debug(1, "Releasing bridge lock on %p to ensure swap operation from bridge channel thread\n", bridge);
- ast_mutex_unlock(&bridge->lock);
- usleep(1);
- ast_mutex_lock(&bridge->lock);
- ast_debug(1, "Reacquired bridge lock on %p\n", bridge);
+ ast_debug(1, "Releasing bridge lock on %p to ensure swap operation from bridge thread\n", bridge);
+ ast_mutex_unlock(&bridge->lock);
+ usleep(1);
+ ast_mutex_lock(&bridge->lock);
+ ast_debug(1, "Reacquired bridge lock on %p\n", bridge);
+ ast_bridge_change_state(swap_channel, AST_BRIDGE_CHANNEL_STATE_SWAP);
+ bridge_channel->state = AST_BRIDGE_CHANNEL_STATE_SWAP;
+ /* We purposely unlock here to give time for the above to happen */
+ ast_debug(1, "Releasing bridge lock on %p to ensure swap operation from bridge channel thread\n", bridge);
+ ast_mutex_unlock(&bridge->lock);
+ usleep(1);
+ ast_mutex_lock(&bridge->lock);
+ ast_debug(1, "Reacquired bridge lock on %p\n", bridge);
}
}
More information about the asterisk-commits
mailing list