[asterisk-commits] file: branch file/bridging r176135 - in /team/file/bridging: apps/ bridges/ c...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Feb 16 11:25:13 CST 2009
Author: file
Date: Mon Feb 16 11:25:13 2009
New Revision: 176135
URL: http://svn.digium.com/svn-view/asterisk?view=rev&rev=176135
Log:
Delete trailing whitespace.
Modified:
team/file/bridging/apps/app_confbridge.c
team/file/bridging/bridges/bridge_builtin_features.c
team/file/bridging/bridges/bridge_multiplexed.c
team/file/bridging/bridges/bridge_softmix.c
team/file/bridging/channels/chan_bridge.c
team/file/bridging/include/asterisk/bridging.h
team/file/bridging/include/asterisk/bridging_features.h
team/file/bridging/include/asterisk/bridging_technology.h
team/file/bridging/main/bridging.c
Modified: team/file/bridging/apps/app_confbridge.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/apps/app_confbridge.c?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/apps/app_confbridge.c (original)
+++ team/file/bridging/apps/app_confbridge.c Mon Feb 16 11:25:13 2009
@@ -715,7 +715,7 @@
if (args.argc == 2) {
ast_app_parse_options(app_opts, &conference_bridge_user.flags, conference_bridge_user.opt_args, args.options);
}
-
+
/* Look for a conference bridge matching the provided name */
if (!(conference_bridge = join_conference_bridge(args.conf_name, &conference_bridge_user))) {
return -1;
Modified: team/file/bridging/bridges/bridge_builtin_features.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/bridges/bridge_builtin_features.c?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/bridges/bridge_builtin_features.c (original)
+++ team/file/bridging/bridges/bridge_builtin_features.c Mon Feb 16 11:25:13 2009
@@ -98,7 +98,7 @@
struct ast_channel *chan = NULL;
struct ast_bridge_features_blind_transfer *blind_transfer = hook_pvt;
const char *context = (blind_transfer && !ast_strlen_zero(blind_transfer->context) ? blind_transfer->context : bridge_channel->chan->context);
-
+
/* Grab the extension to transfer to */
if (!grab_transfer(bridge_channel->chan, exten, sizeof(exten), context)) {
ast_stream_and_wait(bridge_channel->chan, "pbx-invalid", AST_DIGIT_ANY);
@@ -145,11 +145,11 @@
if (called_bridge_channel) {
ast_bridge_change_state(called_bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
}
-
+
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
ao2_unlock(bridge);
-
+
return 0;
}
@@ -163,7 +163,7 @@
enum ast_bridge_channel_state attended_bridge_result;
struct ast_bridge_features_attended_transfer *attended_transfer = hook_pvt;
const char *context = (attended_transfer && !ast_strlen_zero(attended_transfer->context) ? attended_transfer->context : bridge_channel->chan->context);
-
+
/* Grab the extension to transfer to */
if (!grab_transfer(bridge_channel->chan, exten, sizeof(exten), context)) {
ast_stream_and_wait(bridge_channel->chan, "pbx-invalid", AST_DIGIT_ANY);
@@ -236,7 +236,7 @@
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_END);
return 0;
}
-
+
static int unload_module(void)
{
return 0;
@@ -247,10 +247,10 @@
ast_bridge_features_register(AST_BRIDGE_BUILTIN_BLINDTRANSFER, feature_blind_transfer, NULL);
ast_bridge_features_register(AST_BRIDGE_BUILTIN_ATTENDEDTRANSFER, feature_attended_transfer, NULL);
ast_bridge_features_register(AST_BRIDGE_BUILTIN_HANGUP, feature_hangup, NULL);
-
+
/* Bump up our reference count so we can't be unloaded */
ast_module_ref(ast_module_info->self);
-
+
return AST_MODULE_LOAD_SUCCESS;
}
Modified: team/file/bridging/bridges/bridge_multiplexed.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/bridges/bridge_multiplexed.c?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/bridges/bridge_multiplexed.c (original)
+++ team/file/bridging/bridges/bridge_multiplexed.c Mon Feb 16 11:25:13 2009
@@ -242,7 +242,7 @@
if (((c0->writeformat == c1->readformat) && (c0->readformat == c1->writeformat) && (c0->nativeformats == c1->nativeformats))) {
return 0;
}
-
+
return ast_channel_make_compatible(c0, c1);
}
@@ -308,7 +308,7 @@
static int unload_module(void)
{
int res = ast_bridge_technology_unregister(&multiplexed_bridge);
-
+
ao2_ref(multiplexed_threads, -1);
return res;
Modified: team/file/bridging/bridges/bridge_softmix.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/bridges/bridge_softmix.c?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/bridges/bridge_softmix.c (original)
+++ team/file/bridging/bridges/bridge_softmix.c Mon Feb 16 11:25:13 2009
@@ -163,10 +163,10 @@
if (frame->frametype == AST_FRAME_VOICE && frame->subclass == AST_FORMAT_SLINEAR16) {
#else
if (frame->frametype == AST_FRAME_VOICE && frame->subclass == AST_FORMAT_SLINEAR) {
-#endif
+#endif
ast_slinfactory_feed(&sc->factory, frame);
}
-
+
/* If a frame is ready to be written out, do so */
if (sc->have_frame) {
ast_write(bridge_channel->chan, &sc->frame);
@@ -192,7 +192,7 @@
}
ast_mutex_unlock(&sc->lock);
-
+
return 0;
}
@@ -239,7 +239,7 @@
AST_LIST_TRAVERSE(&bridge->channels, bridge_channel, entry) {
struct softmix_channel *sc = bridge_channel->bridge_pvt;
int i = 0;
-
+
/* Copy from local final buffer to our final buffer */
memcpy(sc->final_buf, buf, sizeof(sc->final_buf));
@@ -249,10 +249,10 @@
ast_slinear_saturated_subtract(&sc->final_buf[i], &sc->our_buf[i]);
}
}
-
+
/* The frame is now ready for use... */
sc->have_frame = 1;
-
+
/* Poke bridged channel thread just in case */
pthread_kill(bridge_channel->thread, SIGURG);
}
Modified: team/file/bridging/channels/chan_bridge.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/channels/chan_bridge.c?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/channels/chan_bridge.c (original)
+++ team/file/bridging/channels/chan_bridge.c Mon Feb 16 11:25:13 2009
@@ -21,7 +21,7 @@
* \author Joshua Colp <jcolp at digium.com>
*
* \brief Bridge Interaction Channel
- *
+ *
* \ingroup channel_drivers
*/
@@ -92,7 +92,7 @@
{
struct bridge_pvt *p = ast->tech_pvt;
struct ast_channel *other;
-
+
ast_mutex_lock(&p->lock);
other = (p->input == ast ? p->output : p->input);
@@ -104,7 +104,7 @@
} while (ast_mutex_trylock(&p->lock));
other = (p->input == ast ? p->output : p->input);
}
-
+
/* We basically queue the frame up on the other channel if present */
if (other) {
ast_queue_frame(other, f);
@@ -112,7 +112,7 @@
}
ast_mutex_unlock(&p->lock);
-
+
return 0;
}
@@ -150,7 +150,7 @@
ast_queue_hangup(other);
ast_channel_unlock(other);
}
-
+
return;
}
Modified: team/file/bridging/include/asterisk/bridging.h
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/include/asterisk/bridging.h?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Mon Feb 16 11:25:13 2009
@@ -63,7 +63,7 @@
#endif
#include "asterisk/bridging_features.h"
-
+
/*! \brief Capabilities for a bridge technology */
enum ast_bridge_capability {
/*! Bridge is only capable of mixing 2 channels */
@@ -81,7 +81,7 @@
/*! Bridge technology can optimize things based on who is talking */
AST_BRIDGE_CAPABILITY_OPTIMIZE = (1 << 7),
};
-
+
/*! \brief State information about a bridged channel */
enum ast_bridge_channel_state {
/*! Waiting for a signal */
@@ -108,7 +108,7 @@
AST_BRIDGE_WRITE_UNSUPPORTED,
};
-struct ast_bridge_technology;
+struct ast_bridge_technology;
struct ast_bridge;
/*!
@@ -211,8 +211,8 @@
* This sees if it is possible to create a bridge capable of bridging two channels
* together.
*/
-int ast_bridge_check(int capabilities);
-
+int ast_bridge_check(int capabilities);
+
/*! \brief Destroy a bridge
*
* \param bridge Bridge to destroy
@@ -257,7 +257,7 @@
* can be specified in the features parameter.
*/
enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features);
-
+
/*! \brief Impart (non-blocking) a channel on a bridge
*
* \param bridge Bridge to impart on
Modified: team/file/bridging/include/asterisk/bridging_features.h
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/include/asterisk/bridging_features.h?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/include/asterisk/bridging_features.h (original)
+++ team/file/bridging/include/asterisk/bridging_features.h Mon Feb 16 11:25:13 2009
@@ -33,7 +33,7 @@
/*! Upon hangup the bridge should be discontinued */
AST_BRIDGE_FLAG_DISSOLVE = (1 << 0),
/*! Move between bridging technologies as needed. */
- AST_BRIDGE_FLAG_SMART = (1 << 1),
+ AST_BRIDGE_FLAG_SMART = (1 << 1),
};
/*! \brief Built in features */
@@ -67,7 +67,7 @@
* \brief Maximum length of a DTMF feature string
*/
#define MAXIMUM_DTMF_FEATURE_STRING 8
-
+
/*!
* \brief Structure that is the essence of a features hook
*/
@@ -103,7 +103,7 @@
/*! Context to use for transfers */
char context[AST_MAX_CONTEXT];
};
-
+
/*!
* \brief Structure that contains configuration information for the attended transfer built in feature
*/
@@ -117,7 +117,7 @@
/*! Context to use for transfers */
char context[AST_MAX_CONTEXT];
};
-
+
/*! \brief Register a handler for a built in feature
*
* \param feature The feature that the handler will be responsible for
@@ -154,7 +154,7 @@
* This unregisters the function that is handling the built in attended transfer feature.
*/
int ast_bridge_features_unregister(enum ast_bridge_builtin_feature feature);
-
+
/*! \brief Attach a custom hook to a bridge features structure
*
* \param features Bridge features structure
Modified: team/file/bridging/include/asterisk/bridging_technology.h
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/include/asterisk/bridging_technology.h?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/include/asterisk/bridging_technology.h (original)
+++ team/file/bridging/include/asterisk/bridging_technology.h Mon Feb 16 11:25:13 2009
@@ -94,7 +94,7 @@
*/
int __ast_bridge_technology_register(struct ast_bridge_technology *technology, struct ast_module *mod);
-/*! \brief See \ref __ast_bridge_technology_register() */
+/*! \brief See \ref __ast_bridge_technology_register() */
#define ast_bridge_technology_register(technology) __ast_bridge_technology_register(technology, ast_module_info->self)
/*! \brief Unregister a bridge technology from use
Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/svn-view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=176135&r1=176134&r2=176135
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Mon Feb 16 11:25:13 2009
@@ -88,14 +88,14 @@
if (option_verbose > 1) {
ast_verbose(VERBOSE_PREFIX_2 "Registered bridge technology %s\n", technology->name);
}
-
+
return 0;
}
int ast_bridge_technology_unregister(struct ast_bridge_technology *technology)
{
struct ast_bridge_technology *current = NULL;
-
+
AST_RWLIST_WRLOCK(&bridge_technologies);
/* Ensure the bridge technology is registered before removing it */
@@ -119,7 +119,7 @@
{
/* Change the state on the bridge channel */
bridge_channel->state = new_state;
-
+
/* Poke the bridge technology as well if it wants to know about this */
if (bridge_channel->bridge->technology->poke) {
bridge_channel->bridge->technology->poke(bridge_channel->bridge, bridge_channel);
@@ -143,7 +143,7 @@
if (bridge->thread != AST_PTHREADT_NULL && bridge->thread != AST_PTHREADT_STOP) {
pthread_kill(bridge->thread, SIGURG);
}
-
+
return;
}
@@ -263,7 +263,7 @@
if (chan && !bridge_channel) {
bridge_channel = find_bridge_channel(bridge, chan);
}
-
+
/* If a bridge channel with actual channel is present read a frame and handle it */
if (chan && bridge_channel) {
struct ast_frame *frame = (((bridge->features.mute) || (bridge_channel->features && bridge_channel->features->mute)) ? ast_read_noaudio(chan) : ast_read(chan));
@@ -349,7 +349,7 @@
bridge->refresh = 0;
ast_debug(1, "Launching bridge thread function %p for bridge %p\n", (bridge->technology->thread ? bridge->technology->thread : &generic_thread_loop), bridge);
-
+
/* Execute the appropriate thread function. If the technology does not provide one we use the generic one */
res = (bridge->technology->thread ? bridge->technology->thread(bridge) : generic_thread_loop(bridge));
}
@@ -444,7 +444,7 @@
ast_bridge_destroy(other_bridge);
}
-
+
/* If capabilities were provided use our helper function to find the "best" bridge technology, otherwise we can
* just look for the most basic capability needed, single 1to1 mixing. */
bridge_technology = (capabilities ? find_best_technology(capabilities) : find_best_technology(AST_BRIDGE_CAPABILITY_1TO1MIX));
@@ -491,7 +491,7 @@
}
ast_module_unref(bridge_technology->mod);
-
+
return 1;
}
@@ -513,7 +513,7 @@
}
ao2_unlock(bridge);
-
+
ao2_ref(bridge, -1);
return 0;
@@ -526,7 +526,7 @@
/* Are the formats currently in use something ths bridge can handle? */
if (!(bridge->technology->formats & bridge_channel->chan->readformat)) {
int best_format = ast_best_codec(bridge->technology->formats);
-
+
/* Read format is a no go... */
if (option_debug) {
char codec_buf[512];
@@ -545,7 +545,7 @@
if (!(bridge->technology->formats & formats[1])) {
int best_format = ast_best_codec(bridge->technology->formats);
-
+
/* Write format is a no go... */
if (option_debug) {
char codec_buf[512];
@@ -595,7 +595,7 @@
ast_debug(1, "Bridge '%p' has no new capabilities, not performing smart bridge operation.\n", bridge);
return 0;
}
-
+
/* Attempt to find a new bridge technology to satisfy the capabilities */
if (!(new_technology = find_best_technology(new_capabilities))) {
ast_debug(1, "Smart bridge operation was unable to find new bridge technology with capabilities %d to satisfy bridge %p\n", new_capabilities, bridge);
@@ -850,7 +850,7 @@
/* Make the channel compatible with the bridge */
bridge_make_compatible(bridge_channel->bridge, bridge_channel);
-
+
/* Tell the bridge technology we are joining so they set us up */
if (bridge_channel->bridge->technology->join) {
ast_debug(1, "Giving bridge technology %s notification that %p is joining bridge %p\n", bridge_channel->bridge->technology->name, bridge_channel, bridge_channel->bridge);
@@ -1201,9 +1201,9 @@
if (!ast_strlen_zero(dtmf)) {
ast_copy_string(builtin_features_dtmf[feature], dtmf, sizeof(builtin_features_dtmf[feature]));
}
-
+
builtin_features_handlers[feature] = callback;
-
+
return 0;
}
@@ -1214,7 +1214,7 @@
}
builtin_features_handlers[feature] = NULL;
-
+
return 0;
}
@@ -1273,7 +1273,7 @@
/* Initialize the hooks list, just in case */
AST_LIST_HEAD_INIT_NOLOCK(&features->hooks);
-
+
return 0;
}
More information about the asterisk-commits
mailing list