diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c index a9f256e3b16730c7de906a049d1dd1607899fff2..6ed2ccad1be42cfd30a3592fd69db9ed8fac7067 100644 --- a/apps/app_agent_pool.c +++ b/apps/app_agent_pool.c @@ -40,10 +40,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_internal.h" -#include "asterisk/bridging_basic.h" -#include "asterisk/bridging_after.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_internal.h" +#include "asterisk/bridge_basic.h" +#include "asterisk/bridge_after.h" #include "asterisk/config_options.h" #include "asterisk/features_config.h" #include "asterisk/astobj2.h" @@ -1403,7 +1403,7 @@ static struct ast_bridge *bridge_agent_hold_new(void) return bridge; } -static void bridging_init_agent_hold(void) +static void bridge_init_agent_hold(void) { /* Setup bridge agent_hold subclass v_table. */ bridge_agent_hold_v_table = ast_bridge_base_v_table; @@ -2556,7 +2556,7 @@ static int load_module(void) } /* Init agent holding bridge v_table. */ - bridging_init_agent_hold(); + bridge_init_agent_hold(); /* Setup to provide Agent:agent-id device state. */ res |= ast_devstate_prov_add("Agent", agent_pvt_devstate_get); diff --git a/apps/app_bridgewait.c b/apps/app_bridgewait.c index 356e62530ecdfe6f667dbfca6de0b4c5f4dcf1e2..e26423654bf008dcdfffa7a389ffc9d3926052d4 100644 --- a/apps/app_bridgewait.c +++ b/apps/app_bridgewait.c @@ -45,7 +45,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/lock.h" #include "asterisk/utils.h" #include "asterisk/app.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/musiconhold.h" /*** DOCUMENTATION diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c index f90d565e22fd17295314a19f791e2cb6159cc328..3b58a4d86f354790d6fd7542e061ae8e9eb0536d 100644 --- a/apps/app_confbridge.c +++ b/apps/app_confbridge.c @@ -32,7 +32,7 @@ * \addtogroup configuration_file Configuration Files */ -/*! +/*! * \page confbridge.conf confbridge.conf * \verbinclude confbridge.conf.sample */ @@ -58,7 +58,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/module.h" #include "asterisk/lock.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/musiconhold.h" #include "asterisk/say.h" #include "asterisk/audiohook.h" @@ -68,7 +68,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/manager.h" #include "asterisk/test.h" #include "asterisk/stasis.h" -#include "asterisk/stasis_bridging.h" +#include "asterisk/stasis_bridges.h" #include "asterisk/json.h" /*** DOCUMENTATION @@ -128,13 +128,13 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </syntax> <description> <para>---- Example 1 ----</para> - <para>In this example the custom set user profile on this channel will automatically be used by the ConfBridge app.</para> + <para>In this example the custom set user profile on this channel will automatically be used by the ConfBridge app.</para> <para>exten => 1,1,Answer() </para> <para>exten => 1,n,Set(CONFBRIDGE(user,announce_join_leave)=yes)</para> <para>exten => 1,n,Set(CONFBRIDGE(user,startmuted)=yes)</para> <para>exten => 1,n,ConfBridge(1) </para> <para>---- Example 2 ----</para> - <para>This example shows how to use a predefined user or bridge profile in confbridge.conf as a template for a dynamic profile. Here we make a admin/marked user out of the default_user profile that is already defined in confbridge.conf.</para> + <para>This example shows how to use a predefined user or bridge profile in confbridge.conf as a template for a dynamic profile. Here we make a admin/marked user out of the default_user profile that is already defined in confbridge.conf.</para> <para>exten => 1,1,Answer() </para> <para>exten => 1,n,Set(CONFBRIDGE(user,template)=default_user)</para> <para>exten => 1,n,Set(CONFBRIDGE(user,admin)=yes)</para> @@ -155,7 +155,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") </parameter> </syntax> <description> - <para>This function returns a non-negative integer for valid conference identifiers (0 or 1 for <literal>locked</literal>) and "" for invalid conference identifiers.</para> + <para>This function returns a non-negative integer for valid conference identifiers (0 or 1 for <literal>locked</literal>) and "" for invalid conference identifiers.</para> </description> </function> <manager name="ConfbridgeList" language="en_US"> @@ -2240,7 +2240,7 @@ static char *handle_cli_confbridge_list(struct ast_cli_entry *e, int cmd, struct " Lists all currently active conference bridges or a specific conference bridge.\n" "\n" " When a conference bridge name is provided, flags may be shown for users. Below\n" - " are the flags and what they represent.\n" + " are the flags and what they represent.\n" "\n" " Flags:\n" " A - The user is an admin\n" @@ -2710,7 +2710,7 @@ static int action_confbridgelistrooms(struct mansession *s, const struct message conference->name, conference->activeusers + conference->waitingusers, conference->markedusers, - conference->locked ? "Yes" : "No"); + conference->locked ? "Yes" : "No"); ao2_unlock(conference); ao2_ref(conference, -1); @@ -3147,8 +3147,8 @@ static int unload_module(void) * Module loading including tests for configuration or dependencies. * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails - * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the - * configuration file or other non-critical problem return + * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the + * configuration file or other non-critical problem return * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS. */ static int load_module(void) diff --git a/apps/app_dial.c b/apps/app_dial.c index 6d7c1abb50b637c192698012fe1ad05b2111c601..4397c5090f2eea599e39888ca52e6463944cdd70 100644 --- a/apps/app_dial.c +++ b/apps/app_dial.c @@ -66,8 +66,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/framehook.h" #include "asterisk/dial.h" #include "asterisk/stasis_channels.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_after.h" +#include "asterisk/bridge_after.h" #include "asterisk/features_config.h" /*** DOCUMENTATION diff --git a/apps/app_dumpchan.c b/apps/app_dumpchan.c index 7613832d4d614bbc4ee2c09ffc1f17d0b7abdd14..18dfb96d096f9604672c2902ab62d2d30bafb29e 100644 --- a/apps/app_dumpchan.c +++ b/apps/app_dumpchan.c @@ -41,7 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" #include "asterisk/app.h" #include "asterisk/translate.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" /*** DOCUMENTATION <application name="DumpChan" language="en_US"> @@ -139,10 +139,10 @@ static int serialize_showchan(struct ast_channel *c, char *buf, size_t size) S_OR(ast_channel_dialed(c)->number.str, "(N/A)"), S_COR(ast_channel_redirecting(c)->from.number.valid, ast_channel_redirecting(c)->from.number.str, "(N/A)"), ast_channel_parkinglot(c), - ast_channel_language(c), + ast_channel_language(c), ast_state2str(ast_channel_state(c)), ast_channel_state(c), - ast_channel_rings(c), + ast_channel_rings(c), ast_getformatname_multiple(nf, sizeof(nf), ast_channel_nativeformats(c)), ast_getformatname(ast_channel_writeformat(c)), ast_getformatname(ast_channel_readformat(c)), diff --git a/apps/app_queue.c b/apps/app_queue.c index 6b89a7046363967576f94b670596e55d2e51cb2a..195517f577d13da6c301c6bc5f44935cc5068088 100644 --- a/apps/app_queue.c +++ b/apps/app_queue.c @@ -108,8 +108,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/dial.h" #include "asterisk/stasis_channels.h" #include "asterisk/stasis_message_router.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_after.h" +#include "asterisk/bridge_after.h" /* Define, to debug reference counts on queues, without debugging reference counts on queue members */ /* #define REF_DEBUG_ONLY_QUEUES */ diff --git a/apps/confbridge/conf_chan_announce.c b/apps/confbridge/conf_chan_announce.c index f3ff79fbc22e38eb0218d4674654b1834ecd1975..19224254da092ae9f42ef1a1f1ae6df77800c0a4 100644 --- a/apps/confbridge/conf_chan_announce.c +++ b/apps/confbridge/conf_chan_announce.c @@ -32,7 +32,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/core_unreal.h" #include "include/confbridge.h" diff --git a/apps/confbridge/conf_chan_record.c b/apps/confbridge/conf_chan_record.c index 8198b4fa0001f9c475dd5ed737e92bae7eed4260..c3f717074ac2507b17516ea3ea3bf69cbc7dd0eb 100644 --- a/apps/confbridge/conf_chan_record.c +++ b/apps/confbridge/conf_chan_record.c @@ -32,7 +32,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "include/confbridge.h" /* ------------------------------------------------------------------- */ diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c index 35d96ae31ebd9031dc1b8edd10325689578c8db6..58431ca3c83644d1b913541853563e9f9dabe0bb 100644 --- a/apps/confbridge/conf_config_parser.c +++ b/apps/confbridge/conf_config_parser.c @@ -36,7 +36,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "include/confbridge.h" #include "asterisk/astobj2.h" #include "asterisk/cli.h" -#include "asterisk/bridging_features.h" +#include "asterisk/bridge_features.h" #include "asterisk/stringfields.h" #include "asterisk/pbx.h" diff --git a/apps/confbridge/confbridge_manager.c b/apps/confbridge/confbridge_manager.c index bed4006e86d6a95c292479416a010cf19eb7bf37..41314343f0575f0aae77935345ba84e8f6c42846 100644 --- a/apps/confbridge/confbridge_manager.c +++ b/apps/confbridge/confbridge_manager.c @@ -28,10 +28,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/stasis.h" #include "asterisk/stasis_channels.h" -#include "asterisk/stasis_bridging.h" +#include "asterisk/stasis_bridges.h" #include "asterisk/manager.h" #include "asterisk/stasis_message_router.h" #include "include/confbridge.h" diff --git a/apps/confbridge/include/confbridge.h b/apps/confbridge/include/confbridge.h index 60b2eab8752d6dc0305c475aec40c8633a11f531..7c2abda6c484a5efb2a25aaf0f9c73cd7f2a6c8a 100644 --- a/apps/confbridge/include/confbridge.h +++ b/apps/confbridge/include/confbridge.h @@ -26,8 +26,8 @@ #include "asterisk/logger.h" #include "asterisk/linkedlists.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_features.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_features.h" #include "conf_state.h" /* Maximum length of a conference bridge name */ diff --git a/bridges/bridge_builtin_features.c b/bridges/bridge_builtin_features.c index 00c88710cdde5c2810e8315421f819c6220719fb..324969f334292d664c1d381fe07d4ad5323c4762 100644 --- a/bridges/bridge_builtin_features.c +++ b/bridges/bridge_builtin_features.c @@ -41,8 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_technology.h" #include "asterisk/frame.h" #include "asterisk/file.h" #include "asterisk/app.h" diff --git a/bridges/bridge_builtin_interval_features.c b/bridges/bridge_builtin_interval_features.c index 5a02991d4efaac4e6da532bb07f6aaa8b47a2fac..be57ad290078e8bcdb7f4e6d7acf8796da663d9a 100644 --- a/bridges/bridge_builtin_interval_features.c +++ b/bridges/bridge_builtin_interval_features.c @@ -40,7 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$REVISION: 381278 $") #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/file.h" #include "asterisk/app.h" #include "asterisk/astobj2.h" diff --git a/bridges/bridge_holding.c b/bridges/bridge_holding.c index 43dde5bdfc25b0b35cf1be70a42ecf024022948a..646b480ca18a177c4eca29deefd95897e54c27b7 100644 --- a/bridges/bridge_holding.c +++ b/bridges/bridge_holding.c @@ -44,8 +44,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_technology.h" #include "asterisk/frame.h" #include "asterisk/musiconhold.h" diff --git a/bridges/bridge_native_rtp.c b/bridges/bridge_native_rtp.c index 6d0786063b22b607c727fd847dd392932f949e59..13351b27783ac7d2aba1552be6a8ef49ea7f26bb 100644 --- a/bridges/bridge_native_rtp.c +++ b/bridges/bridge_native_rtp.c @@ -41,8 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_technology.h" #include "asterisk/frame.h" #include "asterisk/rtp_engine.h" diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c index d2019866bd5d022a5f59a85c3d5416842bc61955..78ac7a4ae2c5f97a0ccb57254ce34d1fdd9426a6 100644 --- a/bridges/bridge_simple.c +++ b/bridges/bridge_simple.c @@ -41,8 +41,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_technology.h" #include "asterisk/frame.h" static int simple_bridge_join(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel) diff --git a/bridges/bridge_softmix.c b/bridges/bridge_softmix.c index 503c0b9a58c6fd941bfc832fbd26a9bf2f83ac53..4e4adcb223935247c346e828165594fcf6dcd0a5 100644 --- a/bridges/bridge_softmix.c +++ b/bridges/bridge_softmix.c @@ -45,8 +45,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_technology.h" #include "asterisk/frame.h" #include "asterisk/options.h" #include "asterisk/logger.h" diff --git a/channels/chan_bridge_media.c b/channels/chan_bridge_media.c index d24201207a9c953d6985797689ca9be1ec5f9c32..3abee9832325be6a142ac299f1c20480f083790b 100644 --- a/channels/chan_bridge_media.c +++ b/channels/chan_bridge_media.c @@ -37,7 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/core_unreal.h" #include "asterisk/module.h" diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c index a3a16c8294c10ca38e53646ff756940af0295af0..1adf2930e1b84fe973ec25433c63df88234e7aae 100644 --- a/channels/chan_dahdi.c +++ b/channels/chan_dahdi.c @@ -124,7 +124,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/ccss.h" #include "asterisk/data.h" #include "asterisk/features_config.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/stasis_channels.h" #include "chan_dahdi.h" #include "dahdi/bridge_native_dahdi.h" @@ -506,7 +506,7 @@ static int mwilevel = 512; static int dtmfcid_level = 256; #define REPORT_CHANNEL_ALARMS 1 -#define REPORT_SPAN_ALARMS 2 +#define REPORT_SPAN_ALARMS 2 static int report_alarms = REPORT_CHANNEL_ALARMS; #ifdef HAVE_PRI @@ -1705,14 +1705,14 @@ static void my_ami_channel_event(void *pvt, struct ast_channel *chan) #endif /* linear_mode = 0 - turn linear mode off, >0 - turn linear mode on -* returns the last value of the linear setting -*/ +* returns the last value of the linear setting +*/ static int my_set_linear_mode(void *pvt, enum analog_sub sub, int linear_mode) { struct dahdi_pvt *p = pvt; int oldval; int idx = analogsub_to_dahdisub(sub); - + dahdi_setlinear(p->subs[idx].dfd, linear_mode); oldval = p->subs[idx].linear; p->subs[idx].linear = linear_mode ? 1 : 0; @@ -4516,7 +4516,7 @@ static int drc_sample(int sample, float drc) float neg; float shallow, steep; float max = SHRT_MAX; - + neg = (sample < 0 ? -1 : 1); steep = drc*sample; shallow = neg*(max-max/drc)+(float)sample/drc; @@ -4974,7 +4974,7 @@ static int dahdi_call(struct ast_channel *ast, const char *rdest, int timeout) set_actual_gain(p->subs[SUB_REAL].dfd, 0, 0, p->rxdrc, p->txdrc, p->law); } else { set_actual_gain(p->subs[SUB_REAL].dfd, p->rxgain, p->txgain, p->rxdrc, p->txdrc, p->law); - } + } #ifdef HAVE_PRI if (dahdi_sig_pri_lib_handles(p->sig)) { @@ -8239,7 +8239,7 @@ static struct ast_frame *dahdi_read(struct ast_channel *ast) /* if the call is already accepted and we already delivered AST_CONTROL_RINGING * now enqueue a progress frame to bridge the media up */ if (p->mfcr2_call_accepted && - !p->mfcr2_progress_sent && + !p->mfcr2_progress_sent && ast_channel_state(ast) == AST_STATE_RINGING) { ast_debug(1, "Enqueuing progress frame after R2 accept in chan %d\n", p->channel); ast_queue_frame(p->owner, &fr); @@ -11060,7 +11060,7 @@ static void *do_monitor(void *data) pfds[count].events = POLLPRI; pfds[count].revents = 0; /* Message waiting or r2 channels also get watched for reading */ - if (i->cidspill || i->mwisendactive || i->mwimonitor_fsk || + if (i->cidspill || i->mwisendactive || i->mwimonitor_fsk || (i->cid_start == CID_START_DTMF_NOALERT && (i->sig == SIG_FXSLS || i->sig == SIG_FXSGS || i->sig == SIG_FXSKS))) { pfds[count].events |= POLLIN; } @@ -11213,7 +11213,7 @@ static void *do_monitor(void *data) int energy; struct timeval now; /* State machine dtmfcid_holdoff_state allows for the line to settle - * before checking agin for dtmf energy. Presently waits for 500 mS before checking again + * before checking agin for dtmf energy. Presently waits for 500 mS before checking again */ if (1 == i->dtmfcid_holdoff_state) { gettimeofday(&i->dtmfcid_delay, NULL); @@ -11231,7 +11231,7 @@ static void *do_monitor(void *data) ast_mutex_unlock(&iflock); if (dahdi_analog_lib_handles(i->sig, i->radio, i->oprmode)) { /* just in case this event changes or somehow destroys a channel, set doomed here too */ - doomed = analog_handle_init_event(i->sig_pvt, ANALOG_EVENT_DTMFCID); + doomed = analog_handle_init_event(i->sig_pvt, ANALOG_EVENT_DTMFCID); i->dtmfcid_holdoff_state = 1; } else { struct ast_callid *callid = NULL; @@ -11492,9 +11492,9 @@ static struct dahdi_mfcr2 *dahdi_r2_get_link(const struct dahdi_chan_conf *conf) struct dahdi_mfcr2 *new_r2link = NULL; struct dahdi_mfcr2 **new_r2links = NULL; - /* Only create a new R2 link if + /* Only create a new R2 link if 1. This is the first link requested - 2. Configuration changed + 2. Configuration changed 3. We got more channels than supported per link */ if (!r2links_count || memcmp(&conf->mfcr2, &r2links[r2links_count - 1]->conf, sizeof(conf->mfcr2)) || @@ -16563,13 +16563,13 @@ static void parse_busy_pattern(struct ast_variable *v, struct ast_dsp_busy_patte for (; ;) { /* Scans the string for the next value in the pattern. If none, it checks to see if any have been entered so far. */ - if(!sscanf(v->value, "%30d", &norval) && count_pattern == 0) { + if(!sscanf(v->value, "%30d", &norval) && count_pattern == 0) { ast_log(LOG_ERROR, "busypattern= expects either busypattern=tonelength,quietlength or busypattern=t1length, q1length, t2length, q2length at line %d.\n", v->lineno); break; } - busy_cadence->pattern[count_pattern] = norval; - + busy_cadence->pattern[count_pattern] = norval; + count_pattern++; if (count_pattern == 4) { break; @@ -16583,11 +16583,11 @@ static void parse_busy_pattern(struct ast_variable *v, struct ast_dsp_busy_patte } busy_cadence->length = count_pattern; - if (count_pattern % 2 != 0) { + if (count_pattern % 2 != 0) { /* The pattern length must be divisible by two */ ast_log(LOG_ERROR, "busypattern= expects either busypattern=tonelength,quietlength or busypattern=t1length, q1length, t2length, q2length at line %d.\n", v->lineno); } - + } static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct ast_variable *v, int reload, int options) @@ -17245,7 +17245,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct #if defined(HAVE_PRI_SERVICE_MESSAGES) } else if (!strcasecmp(v->name, "service_message_support")) { /* assuming switchtype for this channel group has been configured already */ - if ((confp->pri.pri.switchtype == PRI_SWITCH_ATT4ESS + if ((confp->pri.pri.switchtype == PRI_SWITCH_ATT4ESS || confp->pri.pri.switchtype == PRI_SWITCH_LUCENT5E || confp->pri.pri.switchtype == PRI_SWITCH_NI2) && ast_true(v->value)) { confp->pri.pri.enable_service_message_support = 1; @@ -17756,7 +17756,7 @@ static int process_dahdi(struct dahdi_chan_conf *confp, const char *cat, struct for (tmp = iflist, y=-1; tmp; tmp = tmp->next) { if (!tmp->destroy && tmp->span != y) { tmp->manages_span_alarms = 1; - y = tmp->span; + y = tmp->span; } else { tmp->manages_span_alarms = 0; } @@ -18291,8 +18291,8 @@ static const struct ast_data_entry dahdi_data_providers[] = { * Module loading including tests for configuration or dependencies. * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails - * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the - * configuration file or other non-critical problem return + * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the + * configuration file or other non-critical problem return * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS. */ static int load_module(void) diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index 38b94ac3316ca81225f47d13d8a8e34069ba8845..ac88b513f520d38e96ae56957ec0bfa9251e9f5b 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -27,7 +27,7 @@ * \arg \ref Config_iax * * \ingroup channel_drivers - * + * * \todo Implement musicclass settings for IAX2 devices */ @@ -67,7 +67,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/paths.h" #include "asterisk/lock.h" -#include "asterisk/frame.h" +#include "asterisk/frame.h" #include "asterisk/channel.h" #include "asterisk/module.h" #include "asterisk/pbx.h" @@ -102,7 +102,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/netsock2.h" #include "asterisk/security_events.h" #include "asterisk/stasis_endpoints.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/stasis.h" #include "asterisk/stasis_system.h" @@ -793,7 +793,7 @@ struct chan_iax2_pvt { ast_aes_decrypt_key mydcx; /*! Decryption AES-128 Key used to decrypt peer frames */ ast_aes_decrypt_key dcx; - /*! scheduler id associated with iax_key_rotate + /*! scheduler id associated with iax_key_rotate * for encrypted calls*/ int keyrotateid; /*! 32 bytes of semi-random data */ @@ -1032,12 +1032,12 @@ struct iax2_thread { #endif #ifdef DEBUG_SCHED_MULTITHREAD char curfunc[80]; -#endif +#endif int actions; pthread_t threadid; int threadnum; struct sockaddr_in iosin; - unsigned char readbuf[4096]; + unsigned char readbuf[4096]; unsigned char *buf; ssize_t buf_len; size_t buf_size; @@ -1137,8 +1137,8 @@ static ast_mutex_t iaxsl[ARRAY_LEN(iaxs)]; /*! * * \brief Another container of iax2_pvt structures - * - * Active IAX2 pvt stucts used during transfering a call are stored here. + * + * Active IAX2 pvt stucts used during transfering a call are stored here. */ static struct ao2_container *iax_transfercallno_pvts; @@ -1152,7 +1152,7 @@ static struct sockaddr_in debugaddr; static void iax_outputframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, struct sockaddr_in *sin, int datalen) { if (iaxdebug || - (sin && debugaddr.sin_addr.s_addr && + (sin && debugaddr.sin_addr.s_addr && (!ntohs(debugaddr.sin_port) || debugaddr.sin_port == sin->sin_port) && debugaddr.sin_addr.s_addr == sin->sin_addr.s_addr)) { @@ -1837,7 +1837,7 @@ static int user_cmp_cb(void *obj, void *arg, int flags) * \note This funtion calls realtime_peer -> reg_source_db -> iax2_poke_peer -> find_callno, * so do not call it with a pvt lock held. */ -static struct iax2_peer *find_peer(const char *name, int realtime) +static struct iax2_peer *find_peer(const char *name, int realtime) { struct iax2_peer *peer = NULL; @@ -2073,7 +2073,7 @@ static struct chan_iax2_pvt *new_iax(struct sockaddr_in *sin, const char *host) tmp = NULL; return NULL; } - + tmp->prefs = prefs; tmp->pingid = -1; tmp->lagid = -1; @@ -2199,9 +2199,9 @@ static int make_trunk(unsigned short callno, int locked) iaxs[callno] = NULL; /* Update the two timers that should have been started */ - iaxs[x]->pingid = iax2_sched_add(sched, + iaxs[x]->pingid = iax2_sched_add(sched, ping_time * 1000, send_ping, (void *)(long)x); - iaxs[x]->lagid = iax2_sched_add(sched, + iaxs[x]->lagid = iax2_sched_add(sched, lagrq_time * 1000, send_lagrq, (void *)(long)x); if (locked) @@ -2306,7 +2306,7 @@ static int addr_range_match_address_cb(void *obj, void *arg, int flags) return 0; } -/*! +/*! * \internal * * \brief compares sin to calltoken_ignores table to determine if validation is required. @@ -2360,12 +2360,12 @@ static int calltoken_required(struct sockaddr_in *sin, const char *name, int sub return res; } -/*! +/*! * \internal * * \brief set peercnt callno limit. * - * \details + * \details * First looks in custom definitions. If not found, global limit * is used. Entries marked as reg already have * a custom limit set by a registration and are not modified. @@ -2392,7 +2392,7 @@ static void set_peercnt_limit(struct peercnt *peercnt) peercnt->limit = limit; } -/*! +/*! * \internal * \brief sets limits for all peercnts in table. done on reload to reflect changes in conf. */ @@ -2406,9 +2406,9 @@ static int set_peercnt_limit_all_cb(void *obj, void *arg, int flags) return 0; } -/*! +/*! * \internal - * \brief returns match if delme is set. + * \brief returns match if delme is set. */ static int prune_addr_range_cb(void *obj, void *arg, int flags) { @@ -2417,7 +2417,7 @@ static int prune_addr_range_cb(void *obj, void *arg, int flags) return addr_range->delme ? CMP_MATCH : 0; } -/*! +/*! * \internal * \brief modifies peercnt entry in peercnts table. Used to set custom limit or mark a registered ip */ @@ -2446,7 +2446,7 @@ static void peercnt_modify(unsigned char reg, uint16_t limit, struct ast_sockadd } } -/*! +/*! * \internal * \brief adds an ip to the peercnts table, increments connection count if it already exists * @@ -2502,7 +2502,7 @@ static int peercnt_add(struct sockaddr_in *sin) return res; } -/*! +/*! * \internal * \brief decrements a peercnts table entry */ @@ -2528,7 +2528,7 @@ static void peercnt_remove(struct peercnt *peercnt) ao2_unlock(peercnts); } -/*! +/*! * \internal * \brief called by scheduler to decrement object */ @@ -2542,7 +2542,7 @@ static int peercnt_remove_cb(const void *obj) return 0; } -/*! +/*! * \internal * \brief decrements peercnts connection count, finds by addr */ @@ -2560,7 +2560,7 @@ static int peercnt_remove_by_addr(struct sockaddr_in *sin) return 0; } -/*! +/*! * \internal * \brief Create callno_limit entry based on configuration */ @@ -2615,7 +2615,7 @@ static void build_callno_limits(struct ast_variable *v) } } -/*! +/*! * \internal * \brief Create calltoken_ignores entry based on configuration */ @@ -2901,9 +2901,9 @@ static void sched_delay_remove(struct sockaddr_in *sin, callno_entry entry) CALLNO_ENTRY_TO_PTR(entry)); } -/*! +/*! * \internal - * \brief returns whether or not a frame is capable of starting a new IAX2 dialog. + * \brief returns whether or not a frame is capable of starting a new IAX2 dialog. * * \note For this implementation, inbound pokes should _NOT_ be capable of allocating * a new callno. @@ -2952,7 +2952,7 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s }; memcpy(&tmp_pvt.addr, sin, sizeof(tmp_pvt.addr)); - /* this works for finding normal call numbers not involving transfering */ + /* this works for finding normal call numbers not involving transfering */ if ((pvt = ao2_find(iax_peercallno_pvts, &tmp_pvt, OBJ_POINTER))) { if (return_locked) { ast_mutex_lock(&iaxsl[pvt->callno]); @@ -3058,7 +3058,7 @@ static int __find_callno(unsigned short callno, unsigned short dcallno, struct s return res; } -static int find_callno(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int new, int sockfd, int full_frame) { +static int find_callno(unsigned short callno, unsigned short dcallno, struct sockaddr_in *sin, int new, int sockfd, int full_frame) { return __find_callno(callno, dcallno, sin, new, sockfd, 0, full_frame); } @@ -3161,7 +3161,7 @@ static int iax2_queue_hangup(int callno) * * \note IMPORTANT NOTE!!! Any time this function is used, even if iaxs[callno] * was valid before calling it, it may no longer be valid after calling it. - * This function calls iax2_queue_frame(), which may unlock and lock the mutex + * This function calls iax2_queue_frame(), which may unlock and lock the mutex * associated with this callno, meaning that another thread may grab it and destroy the call. */ static int __do_deliver(void *data) @@ -3201,7 +3201,7 @@ static int handle_error(void) else { if (m.msg_controllen) { sin = (struct sockaddr_in *)SO_EE_OFFENDER(&e); - if (sin) + if (sin) ast_log(LOG_WARNING, "Receive error from %s\n", ast_inet_ntoa(sin->sin_addr)); else ast_log(LOG_WARNING, "No address detected??\n"); @@ -3380,7 +3380,7 @@ static void __attempt_transmit(const void *data) int freeme = 0; int callno = f->callno; /* Make sure this call is still active */ - if (callno) + if (callno) ast_mutex_lock(&iaxsl[callno]); if (callno && iaxs[callno]) { if ((f->retries < 0) /* Already ACK'd */ || @@ -3452,7 +3452,7 @@ static int attempt_transmit(const void *data) { #ifdef SCHED_MULTITHREADED if (schedule_action(__attempt_transmit, data)) -#endif +#endif __attempt_transmit(data); return 0; } @@ -3624,7 +3624,7 @@ static int peer_status(struct iax2_peer *peer, char *status, int statuslen) } else { ast_copy_string(status, "UNKNOWN", statuslen); } - } else { + } else { ast_copy_string(status, "Unmonitored", statuslen); res = -1; } @@ -3703,7 +3703,7 @@ static char *handle_cli_iax2_show_peer(struct ast_cli_entry *e, int cmd, struct ast_cli(a->fd, ")\n"); ast_cli(a->fd, " Status : "); - peer_status(peer, status, sizeof(status)); + peer_status(peer, status, sizeof(status)); ast_cli(a->fd, "%s\n",status); ast_cli(a->fd, " Qualify : every %dms when OK, every %dms when UNREACHABLE (sample smoothing %s)\n", peer->pokefreqok, peer->pokefreqnotok, peer->smoothing ? "On" : "Off"); ast_cli(a->fd, "\n"); @@ -3806,23 +3806,23 @@ static char *handle_cli_iax2_set_mtu(struct ast_cli_entry *e, int cmd, struct as } if (a->argc != 4) - return CLI_SHOWUSAGE; + return CLI_SHOWUSAGE; if (strncasecmp(a->argv[3], "default", strlen(a->argv[3])) == 0) mtuv = MAX_TRUNK_MTU; else mtuv = atoi(a->argv[3]); if (mtuv == 0) { - ast_cli(a->fd, "Trunk MTU control disabled (mtu was %d)\n", global_max_trunk_mtu); - global_max_trunk_mtu = 0; - return CLI_SUCCESS; + ast_cli(a->fd, "Trunk MTU control disabled (mtu was %d)\n", global_max_trunk_mtu); + global_max_trunk_mtu = 0; + return CLI_SUCCESS; } if (mtuv < 172 || mtuv > 4000) { - ast_cli(a->fd, "Trunk MTU must be between 172 and 4000\n"); - return CLI_SHOWUSAGE; + ast_cli(a->fd, "Trunk MTU must be between 172 and 4000\n"); + return CLI_SHOWUSAGE; } - ast_cli(a->fd, "Trunk MTU changed from %d to %d\n", global_max_trunk_mtu, mtuv); - global_max_trunk_mtu = mtuv; + ast_cli(a->fd, "Trunk MTU changed from %d to %d\n", global_max_trunk_mtu, mtuv); + global_max_trunk_mtu = mtuv; return CLI_SUCCESS; } @@ -3960,7 +3960,7 @@ static void __get_from_jb(const void *p) long ms; long next; struct timeval now = ast_tvnow(); - + /* Make sure we have a valid private structure before going on */ ast_mutex_lock(&iaxsl[callno]); pvt = iaxs[callno]; @@ -3971,14 +3971,14 @@ static void __get_from_jb(const void *p) } pvt->jbid = -1; - + /* round up a millisecond since ast_sched_runq does; */ /* prevents us from spinning while waiting for our now */ /* to catch up with runq's now */ now.tv_usec += 1000; - + ms = ast_tvdiff_ms(now, pvt->rxcore); - + if(ms >= (next = jb_next(pvt->jb))) { struct ast_format voicefmt; ast_format_from_old_bitfield(&voicefmt, pvt->voiceformat); @@ -3993,7 +3993,7 @@ static void __get_from_jb(const void *p) case JB_INTERP: { struct ast_frame af = { 0, }; - + /* create an interpolation frame */ af.frametype = AST_FRAME_VOICE; ast_format_copy(&af.subclass.format, &voicefmt); @@ -4001,7 +4001,7 @@ static void __get_from_jb(const void *p) af.src = "IAX2 JB interpolation"; af.delivery = ast_tvadd(pvt->rxcore, ast_samp2tv(next, 1000)); af.offset = AST_FRIENDLY_OFFSET; - + /* queue the frame: For consistency, we would call __do_deliver here, but __do_deliver wants an iax_frame, * which we'd need to malloc, and then it would free it. That seems like a drag */ if (!ast_test_flag64(iaxs[callno], IAX_ALREADYGONE)) { @@ -4032,7 +4032,7 @@ static int get_from_jb(const void *data) { #ifdef SCHED_MULTITHREADED if (schedule_action(__get_from_jb, data)) -#endif +#endif __get_from_jb(data); return 0; } @@ -4193,7 +4193,7 @@ static int iax2_digit_end(struct ast_channel *c, char digit, unsigned int durati static int iax2_sendtext(struct ast_channel *c, const char *text) { - + return send_command_locked(PTR_TO_CALLNO(ast_channel_tech_pvt(c)), AST_FRAME_TEXT, 0, 0, (unsigned char *)text, strlen(text) + 1, -1); } @@ -4395,7 +4395,7 @@ static struct iax2_user *realtime_user(const char *username, struct sockaddr_in if (strcasecmp(tmp->value, "friend") && strcasecmp(tmp->value, "user")) { return NULL; - } + } } tmp = tmp->next; } @@ -4431,8 +4431,8 @@ static void realtime_update_peer(const char *peername, struct ast_sockaddr *sock snprintf(regseconds, sizeof(regseconds), "%d", (int)regtime); snprintf(port, sizeof(port), "%d", ast_sockaddr_port(sockaddr)); - ast_update_realtime("iaxpeers", "name", peername, - "ipaddr", ast_sockaddr_stringify_addr(sockaddr), "port", port, + ast_update_realtime("iaxpeers", "name", peername, + "ipaddr", ast_sockaddr_stringify_addr(sockaddr), "port", port, "regseconds", regseconds, syslabel, sysname, SENTINEL); /* note syslable can be NULL */ } @@ -4586,7 +4586,7 @@ static int auto_congest(const void *data) { #ifdef SCHED_MULTITHREADED if (schedule_action(__auto_congest, data)) -#endif +#endif __auto_congest(data); return 0; } @@ -4674,16 +4674,16 @@ static void resend_with_token(int callno, struct iax_frame *f, const char *newto return; /* this should not be possible if called from socket_process() */ } - /* + /* * Check to make sure last frame sent is valid for call token resend - * 1. Frame should _NOT_ be encrypted since it starts the IAX dialog + * 1. Frame should _NOT_ be encrypted since it starts the IAX dialog * 2. Frame should _NOT_ already have a destination callno * 3. Frame must be a valid iax_frame subclass capable of starting dialog * 4. Pvt must have a calltoken_ie_len which represents the number of * bytes at the end of the frame used for the previous calltoken ie. * 5. Pvt's calltoken_ie_len must be _LESS_ than the total IE length * 6. Total length of f->data must be _LESS_ than size of our data struct - * because f->data must be able to fit within data. + * because f->data must be able to fit within data. */ if (f->encmethods || f->dcallno || !iax2_allow_new(frametype, subclass, 0) || !pvt->calltoken_ie_len || (pvt->calltoken_ie_len > ie_data_pos) || @@ -4764,9 +4764,9 @@ static void requirecalltoken_mark_auto(const char *name, int subclass) * \internal * * \brief handles calltoken logic for a received iax_frame. - * + * * \note frametype must be AST_FRAME_IAX. - * + * * \note * Three different cases are possible here. * Case 1. An empty calltoken is provided. This means the client supports @@ -4837,7 +4837,7 @@ static int handle_call_token(struct ast_iax2_full_hdr *fh, struct iax_ies *ies, goto reject; /* too much delay, reject */ } - /* at this point the call token is valid, returning 0 + /* at this point the call token is valid, returning 0 * will allow socket_process to continue as usual */ requirecalltoken_mark_auto(ies->username, subclass); return 0; @@ -4988,7 +4988,7 @@ static int iax2_call(struct ast_channel *c, const char *dest, int timeout) l = ast_channel_connected(c)->id.number.valid ? ast_channel_connected(c)->id.number.str : NULL; n = ast_channel_connected(c)->id.name.valid ? ast_channel_connected(c)->id.name.str : NULL; - /* Now build request */ + /* Now build request */ memset(&ied, 0, sizeof(ied)); /* On new call, first IE MUST be IAX version of caller */ @@ -5054,7 +5054,7 @@ static int iax2_call(struct ast_channel *c, const char *dest, int timeout) iaxs[callno]->encmethods = cai.encmethods; iaxs[callno]->adsi = cai.adsi; - + ast_string_field_set(iaxs[callno], mohinterpret, cai.mohinterpret); ast_string_field_set(iaxs[callno], mohsuggest, cai.mohsuggest); @@ -5094,7 +5094,7 @@ static int iax2_call(struct ast_channel *c, const char *dest, int timeout) osp_block_index++; osp_token_ptr += osp_block_length; osp_token_length -= osp_block_length; - } + } } else ast_log(LOG_WARNING, "OSP token is too long\n"); } else if (iaxdebug) @@ -5287,7 +5287,7 @@ static int iax2_queryoption(struct ast_channel *c, int option, void *data, int * } } -static struct ast_frame *iax2_read(struct ast_channel *c) +static struct ast_frame *iax2_read(struct ast_channel *c) { ast_debug(1, "I should never be called!\n"); return &ast_null_frame; @@ -5506,7 +5506,7 @@ static enum ast_bridge_result iax2_bridge(struct ast_channel *c0, struct ast_cha } if ((f->frametype == AST_FRAME_VOICE) || (f->frametype == AST_FRAME_TEXT) || - (f->frametype == AST_FRAME_VIDEO) || + (f->frametype == AST_FRAME_VIDEO) || (f->frametype == AST_FRAME_IMAGE) || (f->frametype == AST_FRAME_DTMF) || (f->frametype == AST_FRAME_CONTROL && f->subclass.integer != AST_CONTROL_PVT_CAUSE_CODE)) { @@ -5793,14 +5793,14 @@ static unsigned int calc_txpeerstamp(struct iax2_trunk_peer *tpeer, int sampms, } /* Update last transmit time now */ tpeer->lasttxtime = *now; - + /* Calculate ms offset */ ms = ast_tvdiff_ms(*now, tpeer->txtrunktime); /* Predict from last value */ pred = tpeer->lastsent + sampms; if (abs(ms - pred) < MAX_TIMESTAMP_SKEW) ms = pred; - + /* We never send the same timestamp twice, so fudge a little if we must */ if (ms == tpeer->lastsent) ms = tpeer->lastsent + 1; @@ -5876,7 +5876,7 @@ static unsigned int calc_timestamp(struct chan_iax2_pvt *p, unsigned int ts, str When we send voice, we usually send "calculated" timestamps worked out on the basis of the number of samples sent. When we send other frames, we usually send timestamps worked out from the real clock. - The problem is that they can tend to drift out of step because the + The problem is that they can tend to drift out of step because the source channel's clock and our clock may not be exactly at the same rate. We fix this by continuously "tweaking" p->offset. p->offset is "time zero" for this call. Moving it adjusts timestamps for non-voice frames. @@ -5887,7 +5887,7 @@ static unsigned int calc_timestamp(struct chan_iax2_pvt *p, unsigned int ts, str The use of a moving average avoids offset moving too radically. Generally, "adjust" roams back and forth around 0, with offset hardly changing at all. But if a consistent different starts to develop it - will be eliminated over the course of 10 frames (200-300msecs) + will be eliminated over the course of 10 frames (200-300msecs) */ adjust = (ms - p->nextpred); if (adjust < 0) @@ -5998,7 +5998,7 @@ static unsigned int calc_rxstamp(struct chan_iax2_pvt *p, unsigned int offset) static struct iax2_trunk_peer *find_tpeer(struct sockaddr_in *sin, int fd) { struct iax2_trunk_peer *tpeer = NULL; - + /* Finds and locks trunk peer */ AST_LIST_LOCK(&tpeers); @@ -6085,14 +6085,14 @@ static int iax2_trunk_queue(struct chan_iax2_pvt *pvt, struct iax_frame *fr) tpeer->calls++; /* track the largest mtu we actually have sent */ - if (tpeer->trunkdatalen + f->datalen + 4 > trunk_maxmtu) - trunk_maxmtu = tpeer->trunkdatalen + f->datalen + 4 ; + if (tpeer->trunkdatalen + f->datalen + 4 > trunk_maxmtu) + trunk_maxmtu = tpeer->trunkdatalen + f->datalen + 4 ; /* if we have enough for a full MTU, ship it now without waiting */ if (global_max_trunk_mtu > 0 && tpeer->trunkdatalen + f->datalen + 4 >= global_max_trunk_mtu) { now = ast_tvnow(); - send_trunk(tpeer, &now); - trunk_untimed ++; + send_trunk(tpeer, &now); + trunk_untimed ++; } ast_mutex_unlock(&tpeer->lock); @@ -6137,7 +6137,7 @@ static void memcpy_decrypt(unsigned char *dst, const unsigned char *src, int len ast_log(LOG_WARNING, "len should be multiple of 16, not %d!\n", len); for (x=0;x<len;x++) dst[x] = src[x] ^ 0xff; -#else +#else unsigned char lastblock[16] = { 0 }; int x; while(len > 0) { @@ -6168,7 +6168,7 @@ static void memcpy_encrypt(unsigned char *dst, const unsigned char *src, int len for (x=0;x<16;x++) curblock[x] ^= src[x]; ast_aes_encrypt(curblock, dst, ecx); - memcpy(curblock, dst, sizeof(curblock)); + memcpy(curblock, dst, sizeof(curblock)); dst += 16; src += 16; len -= 16; @@ -6285,7 +6285,7 @@ static int decrypt_frame(int callno, struct ast_iax2_full_hdr *fh, struct ast_fr break; } } - } else + } else res = decode_frame(&iaxs[callno]->dcx, fh, f, datalen); return res; } @@ -6314,7 +6314,7 @@ static int iax2_send(struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned in ast_log(LOG_WARNING, "No private structure for packet?\n"); return -1; } - + lastsent = pvt->lastsent; /* Calculate actual timestamp */ @@ -6326,7 +6326,7 @@ static int iax2_send(struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned in if(f->frametype == AST_FRAME_VOICE && f->datalen == 0) return 0; #if 0 - ast_log(LOG_NOTICE, + ast_log(LOG_NOTICE, "f->frametype %c= AST_FRAME_VOICE, %sencrypted, %srotation scheduled...\n", *("=!" + (f->frametype == AST_FRAME_VOICE)), IAX_CALLENCRYPTED(pvt) ? "" : "not ", @@ -6337,11 +6337,11 @@ static int iax2_send(struct chan_iax2_pvt *pvt, struct ast_frame *f, unsigned in iax2_key_rotate(pvt); } - if ((ast_test_flag64(pvt, IAX_TRUNK) || + if ((ast_test_flag64(pvt, IAX_TRUNK) || (((fts & 0xFFFF0000L) == (lastsent & 0xFFFF0000L)) || ((fts & 0xFFFF0000L) == ((lastsent + 0x10000) & 0xFFFF0000L)))) /* High two bytes are the same on timestamp, or sending on a trunk */ && - (f->frametype == AST_FRAME_VOICE) + (f->frametype == AST_FRAME_VOICE) /* is a voice frame */ && (f->subclass.format.id == ast_format_id_from_old_bitfield(pvt->svoiceformat)) /* is the same type */ ) { @@ -6561,7 +6561,7 @@ static char *handle_cli_iax2_show_users(struct ast_cli_entry *e, int cmd, struct else pstr = ast_test_flag64(user, IAX_CODEC_USER_FIRST) ? "Caller" : "Host"; - ast_cli(a->fd, FORMAT2, user->name, auth, user->authmethods, + ast_cli(a->fd, FORMAT2, user->name, auth, user->authmethods, user->contexts ? user->contexts->context : DEFAULT_CONTEXT, ast_acl_list_is_empty(user->acl) ? "No" : "Yes", pstr); } @@ -6733,17 +6733,17 @@ static char *handle_cli_iax2_show_threads(struct ast_cli_entry *e, int cmd, stru } if (a->argc != 3) return CLI_SHOWUSAGE; - + ast_cli(a->fd, "IAX2 Thread Information\n"); time(&t); ast_cli(a->fd, "Idle Threads:\n"); AST_LIST_LOCK(&idle_list); AST_LIST_TRAVERSE(&idle_list, thread, list) { #ifdef DEBUG_SCHED_MULTITHREAD - ast_cli(a->fd, "Thread %d: state=%d, update=%d, actions=%d, func='%s'\n", + ast_cli(a->fd, "Thread %d: state=%d, update=%d, actions=%d, func='%s'\n", thread->threadnum, thread->iostate, (int)(t - thread->checktime), thread->actions, thread->curfunc); #else - ast_cli(a->fd, "Thread %d: state=%d, update=%d, actions=%d\n", + ast_cli(a->fd, "Thread %d: state=%d, update=%d, actions=%d\n", thread->threadnum, thread->iostate, (int)(t - thread->checktime), thread->actions); #endif threadcount++; @@ -6757,10 +6757,10 @@ static char *handle_cli_iax2_show_threads(struct ast_cli_entry *e, int cmd, stru else type = 'P'; #ifdef DEBUG_SCHED_MULTITHREAD - ast_cli(a->fd, "Thread %c%d: state=%d, update=%d, actions=%d, func='%s'\n", + ast_cli(a->fd, "Thread %c%d: state=%d, update=%d, actions=%d, func='%s'\n", type, thread->threadnum, thread->iostate, (int)(t - thread->checktime), thread->actions, thread->curfunc); #else - ast_cli(a->fd, "Thread %c%d: state=%d, update=%d, actions=%d\n", + ast_cli(a->fd, "Thread %c%d: state=%d, update=%d, actions=%d\n", type, thread->threadnum, thread->iostate, (int)(t - thread->checktime), thread->actions); #endif threadcount++; @@ -6835,7 +6835,7 @@ static char *complete_iax2_unregister(const char *line, const char *word, int po if (pos == 2) { struct ao2_iterator i = ao2_iterator_init(peers, 0); while ((p = ao2_iterator_next(&i))) { - if (!strncasecmp(p->name, word, wordlen) && + if (!strncasecmp(p->name, word, wordlen) && ++which > state && p->expire > 0) { res = ast_strdup(p->name); peer_unref(p); @@ -7037,12 +7037,12 @@ static char *handle_cli_iax2_show_registry(struct ast_cli_entry *e, int cmd, str AST_LIST_LOCK(®istrations); AST_LIST_TRAVERSE(®istrations, reg, entry) { snprintf(host, sizeof(host), "%s", ast_sockaddr_stringify(®->addr)); - if (reg->us.sin_addr.s_addr) + if (reg->us.sin_addr.s_addr) snprintf(perceived, sizeof(perceived), "%s:%d", ast_inet_ntoa(reg->us.sin_addr), ntohs(reg->us.sin_port)); else ast_copy_string(perceived, "<Unregistered>", sizeof(perceived)); - ast_cli(a->fd, FORMAT, host, - (reg->dnsmgr) ? "Y" : "N", + ast_cli(a->fd, FORMAT, host, + (reg->dnsmgr) ? "Y" : "N", reg->username, perceived, reg->refresh, regstate2str(reg->regstate)); counter++; } @@ -7070,13 +7070,13 @@ static int manager_iax2_show_registry(struct mansession *s, const struct message AST_LIST_LOCK(®istrations); AST_LIST_TRAVERSE(®istrations, reg, entry) { snprintf(host, sizeof(host), "%s", ast_sockaddr_stringify(®->addr)); - + if (reg->us.sin_addr.s_addr) { snprintf(perceived, sizeof(perceived), "%s:%d", ast_inet_ntoa(reg->us.sin_addr), ntohs(reg->us.sin_port)); } else { ast_copy_string(perceived, "<Unregistered>", sizeof(perceived)); } - + astman_append(s, "Event: RegistryEntry\r\n" "%s" @@ -7086,7 +7086,7 @@ static int manager_iax2_show_registry(struct mansession *s, const struct message "Perceived: %s\r\n" "Refresh: %d\r\n" "State: %s\r\n" - "\r\n", idtext, host, (reg->dnsmgr) ? "Y" : "N", reg->username, perceived, + "\r\n", idtext, host, (reg->dnsmgr) ? "Y" : "N", reg->username, perceived, reg->refresh, regstate2str(reg->regstate)); total++; @@ -7099,7 +7099,7 @@ static int manager_iax2_show_registry(struct mansession *s, const struct message "ListItems: %d\r\n" "%s" "\r\n", total, idtext); - + return 0; } @@ -7370,7 +7370,7 @@ static char *handle_cli_iax2_set_debug_jb(struct ast_cli_entry *e, int cmd, stru if (a->argc != e->args) return CLI_SHOWUSAGE; - + if (!strncasecmp(a->argv[e->args -1], "on", 2)) { jb_setoutput(jb_error_output, jb_warning_output, jb_debug_output); ast_cli(a->fd, "IAX2 Jitterbuffer Debugging Enabled\n"); @@ -7445,7 +7445,7 @@ static int send_command_locked(unsigned short callno, char type, int command, un /*! * \note Since this function calls iax2_predestroy() -> iax2_queue_hangup(), - * the pvt struct for the given call number may disappear during its + * the pvt struct for the given call number may disappear during its * execution. */ static int send_command_final(struct chan_iax2_pvt *i, char type, int command, unsigned int ts, const unsigned char *data, int datalen, int seqno) @@ -7496,7 +7496,7 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies if (ies->called_number) ast_string_field_set(iaxs[callno], exten, ies->called_number); if (ies->calling_number) { - if (ast_test_flag64(&globalflags, IAX_SHRINKCALLERID)) { + if (ast_test_flag64(&globalflags, IAX_SHRINKCALLERID)) { ast_shrink_phone_number(ies->calling_number); } ast_string_field_set(iaxs[callno], cid_num, ies->calling_number); @@ -7528,7 +7528,7 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies if (ies->capability) { gotcapability = 1; iaxs[callno]->peercapability = ies->capability; - } + } if (ies->version) version = ies->version; @@ -7538,10 +7538,10 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies ast_codec_pref_convert(&iaxs[callno]->prefs, ies->codec_prefs, 32, 0); } - if (!gotcapability) + if (!gotcapability) iaxs[callno]->peercapability = iaxs[callno]->peerformat; if (version > IAX_PROTO_VERSION) { - ast_log(LOG_WARNING, "Peer '%s' has too new a protocol version (%d) for me\n", + ast_log(LOG_WARNING, "Peer '%s' has too new a protocol version (%d) for me\n", ast_inet_ntoa(sin->sin_addr), version); return res; } @@ -7620,7 +7620,7 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies /* copy vars */ for (v = user->vars ; v ; v = v->next) { if((tmpvar = ast_variable_new(v->name, v->value, v->file))) { - tmpvar->next = iaxs[callno]->vars; + tmpvar->next = iaxs[callno]->vars; iaxs[callno]->vars = tmpvar; } } @@ -7671,7 +7671,7 @@ static int check_access(int callno, struct sockaddr_in *sin, struct iax_ies *ies iaxs[callno]->amaflags = user->amaflags; if (!ast_strlen_zero(user->language)) ast_string_field_set(iaxs[callno], language, user->language); - ast_copy_flags64(iaxs[callno], user, IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_SENDCONNECTEDLINE | IAX_RECVCONNECTEDLINE); + ast_copy_flags64(iaxs[callno], user, IAX_NOTRANSFER | IAX_TRANSFERMEDIA | IAX_USEJITTERBUF | IAX_FORCEJITTERBUF | IAX_SENDCONNECTEDLINE | IAX_RECVCONNECTEDLINE); /* Keep this check last */ if (!ast_strlen_zero(user->dbsecret)) { char *family, *key=NULL; @@ -7801,7 +7801,7 @@ static int authenticate_verify(struct chan_iax2_pvt *p, struct iax_ies *ies) char md5secret[256] = ""; char secret[256] = ""; char rsasecret[256] = ""; - int res = -1; + int res = -1; int x; struct iax2_user *user; @@ -7817,7 +7817,7 @@ static int authenticate_verify(struct chan_iax2_pvt *p, struct iax_ies *ies) ast_string_field_set(p, host, user->name); user = user_unref(user); } - if (ast_test_flag64(p, IAX_FORCE_ENCRYPT) && !p->encmethods) { + if (ast_test_flag64(p, IAX_FORCE_ENCRYPT) && !p->encmethods) { ast_log(LOG_NOTICE, "Call Terminated, Incoming call is unencrypted while force encrypt is enabled.\n"); return res; } @@ -7924,7 +7924,7 @@ static int register_verify(int callno, struct sockaddr_in *sin, struct iax_ies * * 1. A challenge already exists indicating a AUTHREQ was already sent out. * 2. A plaintext secret is present in ie as result of a previous AUTHREQ requesting it. * 3. A plaintext secret is present in the ie and the last_authmethod used by a peer happened - * to be plaintext, indicating it is an authmethod used by other peers on the system. + * to be plaintext, indicating it is an authmethod used by other peers on the system. * * If none of these cases exist, res will be returned as 0 without authentication indicating * an AUTHREQ needs to be sent out. */ @@ -8048,7 +8048,7 @@ static int authenticate(const char *challenge, const char *secret, const char *k int x; if (!ast_strlen_zero(keyn)) { if (!(authmethods & IAX_AUTH_RSA)) { - if (ast_strlen_zero(secret)) + if (ast_strlen_zero(secret)) ast_log(LOG_NOTICE, "Asked to authenticate to %s with an RSA key, but they don't allow RSA authentication\n", ast_inet_ntoa(sin->sin_addr)); } else if (ast_strlen_zero(challenge)) { ast_log(LOG_NOTICE, "No challenge provided for RSA authentication to %s\n", ast_inet_ntoa(sin->sin_addr)); @@ -8068,7 +8068,7 @@ static int authenticate(const char *challenge, const char *secret, const char *k } } } - } + } /* Fall back */ if (res && !ast_strlen_zero(secret)) { if ((authmethods & IAX_AUTH_MD5) && !ast_strlen_zero(challenge)) { @@ -8110,7 +8110,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin, uint16_t callno = p->callno; memset(&ied, 0, sizeof(ied)); - + if (ies->username) ast_string_field_set(p, username, ies->username); if (ies->challenge) @@ -8133,7 +8133,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin, ast_sockaddr_to_sin(&peer->addr, &peer_addr); - if ((ast_strlen_zero(p->peer) || !strcmp(p->peer, peer->name)) + if ((ast_strlen_zero(p->peer) || !strcmp(p->peer, peer->name)) /* No peer specified at our end, or this is the peer */ && (ast_strlen_zero(peer->username) || (!strcmp(peer->username, p->username))) /* No username specified in peer rule, or this is the right username */ @@ -8150,7 +8150,7 @@ static int authenticate_reply(struct chan_iax2_pvt *p, struct sockaddr_in *sin, } ao2_iterator_destroy(&i); if (!peer) { - /* We checked our list and didn't find one. It's unlikely, but possible, + /* We checked our list and didn't find one. It's unlikely, but possible, that we're trying to authenticate *to* a realtime peer */ const char *peer_name = ast_strdupa(p->peer); ast_mutex_unlock(&iaxsl[callno]); @@ -8231,7 +8231,7 @@ static int iax2_do_register_s(const void *data) { #ifdef SCHED_MULTITHREADED if (schedule_action(__iax2_do_register_s, data)) -#endif +#endif __iax2_do_register_s(data); return 0; } @@ -8275,10 +8275,10 @@ static int complete_dpreply(struct chan_iax2_pvt *pvt, struct iax_ies *ies) char exten[256] = ""; int status = CACHE_FLAG_UNKNOWN, expiry = iaxdefaultdpcache, x, matchmore = 0; struct iax2_dpcache *dp = NULL; - + if (ies->called_number) ast_copy_string(exten, ies->called_number, sizeof(exten)); - + if (ies->dpstatus & IAX_DPSTATUS_EXISTS) status = CACHE_FLAG_EXISTS; else if (ies->dpstatus & IAX_DPSTATUS_CANEXIST) @@ -8290,7 +8290,7 @@ static int complete_dpreply(struct chan_iax2_pvt *pvt, struct iax_ies *ies) expiry = ies->refresh; if (ies->dpstatus & IAX_DPSTATUS_MATCHMORE) matchmore = CACHE_FLAG_MATCHMORE; - + AST_LIST_LOCK(&dpcache); AST_LIST_TRAVERSE_SAFE_BEGIN(&dpcache, dp, peer_list) { if (strcmp(dp->exten, exten)) @@ -8476,7 +8476,7 @@ static int iax2_append_register(const char *hostname, const char *username, AST_LIST_LOCK(®istrations); AST_LIST_INSERT_HEAD(®istrations, reg, entry); AST_LIST_UNLOCK(®istrations); - + return 0; } @@ -8486,7 +8486,7 @@ static int iax2_register(const char *value, int lineno) char *username, *hostname, *secret; char *porta; char *stringp=NULL; - + if (!value) return -1; @@ -8506,7 +8506,7 @@ static int iax2_register(const char *value, int lineno) stringp = hostname; hostname = strsep(&stringp, ":"); porta = strsep(&stringp, ":"); - + if (porta && !atoi(porta)) { ast_log(LOG_WARNING, "%s is not a valid port number at line %d\n", porta, lineno); return -1; @@ -8599,7 +8599,7 @@ static int expire_registry(const void *data) { #ifdef SCHED_MULTITHREADED if (schedule_action(__expire_registry, data)) -#endif +#endif __expire_registry(data); return 0; } @@ -8935,7 +8935,7 @@ static int registry_rerequest(struct iax_ies *ies, int callno, struct sockaddr_i } else return -1; ast_log(LOG_WARNING, "Registry acknowledge on unknown registery '%s'\n", peer); - } else + } else ast_log(LOG_NOTICE, "Can't reregister without a reg\n"); return -1; } @@ -8974,7 +8974,7 @@ static int auth_reject(const void *data) ast_mutex_unlock(&iaxsl[callno]); #ifdef SCHED_MULTITHREADED if (schedule_action(__auth_reject, data)) -#endif +#endif __auth_reject(data); return 0; } @@ -8986,7 +8986,7 @@ static int auth_fail(int callno, int failcode) if (iaxs[callno]) { iaxs[callno]->authfail = failcode; if (delayreject) { - iaxs[callno]->authid = iax2_sched_replace(iaxs[callno]->authid, + iaxs[callno]->authid = iax2_sched_replace(iaxs[callno]->authid, sched, 1000, auth_reject, (void *)(long)callno); } else auth_reject((void *)(long)callno); @@ -9019,7 +9019,7 @@ static int auto_hangup(const void *data) ast_mutex_unlock(&iaxsl[callno]); #ifdef SCHED_MULTITHREADED if (schedule_action(__auto_hangup, data)) -#endif +#endif __auto_hangup(data); return 0; } @@ -9028,7 +9028,7 @@ static void iax2_dprequest(struct iax2_dpcache *dp, int callno) { struct iax_ie_data ied; /* Auto-hangup with 30 seconds of inactivity */ - iaxs[callno]->autoid = iax2_sched_replace(iaxs[callno]->autoid, + iaxs[callno]->autoid = iax2_sched_replace(iaxs[callno]->autoid, sched, 30000, auto_hangup, (void *)(long)callno); memset(&ied, 0, sizeof(ied)); iax_ie_append_str(&ied, IAX_IE_CALLED_NUMBER, dp->exten); @@ -9067,7 +9067,7 @@ static int iax2_poke_peer_s(const void *data) peer->pokeexpire = -1; #ifdef SCHED_MULTITHREADED if (schedule_action(__iax2_poke_peer_s, data)) -#endif +#endif __iax2_poke_peer_s(data); return 0; } @@ -9079,7 +9079,7 @@ static int send_trunk(struct iax2_trunk_peer *tpeer, struct timeval *now) struct ast_iax2_meta_hdr *meta; struct ast_iax2_meta_trunk_hdr *mth; int calls = 0; - + /* Point to frame */ fr = (struct iax_frame *)tpeer->trunkdata; /* Point to meta data */ @@ -9118,7 +9118,7 @@ static int send_trunk(struct iax2_trunk_peer *tpeer, struct timeval *now) static inline int iax2_trunk_expired(struct iax2_trunk_peer *tpeer, struct timeval *now) { /* Drop when trunk is about 5 seconds idle */ - if (now->tv_sec > tpeer->trunkact.tv_sec + 5) + if (now->tv_sec > tpeer->trunkact.tv_sec + 5) return 1; return 0; } @@ -9167,7 +9167,7 @@ static int timing_read(int *id, int fd, short events, void *cbdata) if (drop) { ast_mutex_lock(&drop->lock); - /* Once we have this lock, we're sure nobody else is using it or could use it once we release it, + /* Once we have this lock, we're sure nobody else is using it or could use it once we release it, because by the time they could get tpeerlock, we've already grabbed it */ ast_debug(1, "Dropping unused iax2 trunk peer '%s:%d'\n", ast_inet_ntoa(drop->addr.sin_addr), ntohs(drop->addr.sin_port)); if (drop->trunkdata) { @@ -9240,7 +9240,7 @@ static void spawn_dp_lookup(int callno, const char *context, const char *calledn { pthread_t newthread; struct dpreq_data *dpr; - + if (!(dpr = ast_calloc(1, sizeof(*dpr)))) return; @@ -9283,7 +9283,7 @@ static void construct_rr(struct chan_iax2_pvt *pvt, struct iax_ie_data *iep) iax_ie_append_int(iep,IAX_IE_RR_OOO, stats.frames_ooo); } -static void save_rr(struct iax_frame *fr, struct iax_ies *ies) +static void save_rr(struct iax_frame *fr, struct iax_ies *ies) { iaxs[fr->callno]->remote_rr.jitter = ies->rr_jitter; iaxs[fr->callno]->remote_rr.losspct = ies->rr_loss >> 24; @@ -9294,7 +9294,7 @@ static void save_rr(struct iax_frame *fr, struct iax_ies *ies) iaxs[fr->callno]->remote_rr.ooo = ies->rr_ooo; } -static void save_osptoken(struct iax_frame *fr, struct iax_ies *ies) +static void save_osptoken(struct iax_frame *fr, struct iax_ies *ies) { int i; unsigned int length, offset = 0; @@ -9379,7 +9379,7 @@ static void handle_deferred_full_frames(struct iax2_thread *thread) thread->buf = pkt_buf->buf; thread->buf_len = pkt_buf->len; thread->buf_size = pkt_buf->len + 1; - + socket_process(thread); thread->buf = NULL; @@ -9463,7 +9463,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata) signal_condition(&thread->lock, &thread->cond); return 1; } - + /* Determine if this frame is a full frame; if so, and any thread is currently processing a full frame for the same callno from this peer, then drop this frame (and the peer will retransmit it) */ @@ -9471,7 +9471,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata) if (ntohs(fh->scallno) & IAX_FLAG_FULL) { struct iax2_thread *cur = NULL; uint16_t callno = ntohs(fh->scallno) & ~IAX_FLAG_FULL; - + AST_LIST_LOCK(&active_list); AST_LIST_TRAVERSE(&active_list, cur, list) { if ((cur->ffinfo.callno == callno) && @@ -9496,7 +9496,7 @@ static int socket_read(int *id, int fd, short events, void *cbdata) } AST_LIST_UNLOCK(&active_list); } - + /* Mark as ready and send on its way */ thread->iostate = IAX_IOSTATE_READY; #ifdef DEBUG_SCHED_MULTITHREAD @@ -9521,7 +9521,7 @@ static int socket_process_meta(int packet_len, struct ast_iax2_meta_hdr *meta, s struct ast_frame f = { 0, }; if (packet_len < sizeof(*meta)) { - ast_log(LOG_WARNING, "Rejecting packet from '%s.%d' that is flagged as a meta frame but is too short\n", + ast_log(LOG_WARNING, "Rejecting packet from '%s.%d' that is flagged as a meta frame but is too short\n", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); return 1; } @@ -9541,7 +9541,7 @@ static int socket_process_meta(int packet_len, struct ast_iax2_meta_hdr *meta, s ptr = mth->data; tpeer = find_tpeer(sin, sockfd); if (!tpeer) { - ast_log(LOG_WARNING, "Unable to accept trunked packet from '%s:%d': No matching peer\n", + ast_log(LOG_WARNING, "Unable to accept trunked packet from '%s:%d': No matching peer\n", ast_inet_ntoa(sin->sin_addr), ntohs(sin->sin_port)); return 1; } @@ -9609,7 +9609,7 @@ static int socket_process_meta(int packet_len, struct ast_iax2_meta_hdr *meta, s f.src = "IAX2"; f.mallocd = 0; f.offset = 0; - if (f.datalen && (f.frametype == AST_FRAME_VOICE)) + if (f.datalen && (f.frametype == AST_FRAME_VOICE)) f.samples = ast_codec_get_samples(&f); else f.samples = 0; @@ -9892,7 +9892,7 @@ static int socket_process_helper(struct iax2_thread *thread) * end to know the destination call number before call setup can complete. * * Discussed in the following thread: - * http://lists.digium.com/pipermail/asterisk-dev/2008-May/033217.html + * http://lists.digium.com/pipermail/asterisk-dev/2008-May/033217.html */ if ((ntohs(mh->callno) & IAX_FLAG_FULL) && ((f.frametype == AST_FRAME_IAX) && (f.subclass.integer == IAX_COMMAND_ACK))) { @@ -9933,7 +9933,7 @@ static int socket_process_helper(struct iax2_thread *thread) raw_hangup(&sin, ntohs(fh->dcallno) & ~IAX_FLAG_RETRANS, ntohs(mh->callno) & ~IAX_FLAG_FULL, fd); } - if (fr->callno > 0) + if (fr->callno > 0) ast_mutex_unlock(&iaxsl[fr->callno]); ast_variables_destroy(ies.vars); return 1; @@ -10096,7 +10096,7 @@ static int socket_process_helper(struct iax2_thread *thread) thread->buf[res - 1] = '\0'; } - /* Handle implicit ACKing unless this is an INVAL, and only if this is + /* Handle implicit ACKing unless this is an INVAL, and only if this is from the real peer, not the transfer peer */ if (!inaddrcmp(&sin, &iaxs[fr->callno]->addr) && ((f.subclass.integer != IAX_COMMAND_INVAL) || @@ -10558,15 +10558,15 @@ static int socket_process_helper(struct iax2_thread *thread) "%sactual format = %s,\n" "%shost prefs = %s,\n" "%spriority = %s\n", - ast_inet_ntoa(sin.sin_addr), + ast_inet_ntoa(sin.sin_addr), VERBOSE_PREFIX_4, - iax2_getformatname(iaxs[fr->callno]->peerformat), + iax2_getformatname(iaxs[fr->callno]->peerformat), VERBOSE_PREFIX_4, caller_pref_buf, VERBOSE_PREFIX_4, - iax2_getformatname(format), + iax2_getformatname(format), VERBOSE_PREFIX_4, - host_pref_buf, + host_pref_buf, VERBOSE_PREFIX_4, using_prefs); @@ -10779,7 +10779,7 @@ static int socket_process_helper(struct iax2_thread *thread) peer->historicms = (iaxs[fr->callno]->pingtime + peer->historicms) / 2; else if (peer->smoothing && peer->lastms < 0) peer->historicms = (0 + peer->historicms) / 2; - else + else peer->historicms = iaxs[fr->callno]->pingtime; /* Remove scheduled iax2_poke_noanswer */ @@ -10835,8 +10835,8 @@ static int socket_process_helper(struct iax2_thread *thread) struct ast_frame hangup_fr = { .frametype = AST_FRAME_CONTROL, .subclass.integer = AST_CONTROL_HANGUP, }; - ast_log(LOG_WARNING, - "I don't know how to authenticate %s to %s\n", + ast_log(LOG_WARNING, + "I don't know how to authenticate %s to %s\n", ies.username ? ies.username : "<unknown>", ast_inet_ntoa(iaxs[fr->callno]->addr.sin_addr)); iax2_queue_frame(fr->callno, &hangup_fr); } @@ -10957,7 +10957,7 @@ static int socket_process_helper(struct iax2_thread *thread) } format = iax2_codec_choose(&pref, iaxs[fr->callno]->peercapability & iaxs[fr->callno]->capability, 1); } else /* if no codec_prefs IE do it the old way */ - format = iax2_best_codec(iaxs[fr->callno]->peercapability & iaxs[fr->callno]->capability); + format = iax2_best_codec(iaxs[fr->callno]->peercapability & iaxs[fr->callno]->capability); } } if (!format) { @@ -11001,8 +11001,8 @@ static int socket_process_helper(struct iax2_thread *thread) "%srequested prefs = %s,\n" "%sactual format = %s,\n" "%shost prefs = %s,\n" - "%spriority = %s\n", - ast_inet_ntoa(sin.sin_addr), + "%spriority = %s\n", + ast_inet_ntoa(sin.sin_addr), VERBOSE_PREFIX_4, iax2_getformatname(iaxs[fr->callno]->peerformat), VERBOSE_PREFIX_4, @@ -11176,7 +11176,7 @@ immediatedial: registry_authrequest(fr->callno); break; case IAX_COMMAND_REGACK: - if (iax2_ack_registry(&ies, &sin, fr->callno)) + if (iax2_ack_registry(&ies, &sin, fr->callno)) ast_log(LOG_WARNING, "Registration failure\n"); /* Send ack immediately, before we destroy */ send_command_immediate(iaxs[fr->callno], AST_FRAME_IAX, IAX_COMMAND_ACK, fr->ts, NULL, 0,fr->iseqno); @@ -11310,7 +11310,7 @@ immediatedial: send_command_immediate(iaxs[fr->callno], AST_FRAME_IAX, IAX_COMMAND_ACK, fr->ts, NULL, 0,fr->iseqno); complete_transfer(fr->callno, &ies); stop_stuff(fr->callno); /* for attended transfer to work with libiax */ - break; + break; case IAX_COMMAND_TXMEDIA: if (iaxs[fr->callno]->transferring == TRANSFER_READY) { AST_LIST_TRAVERSE(&frame_queue[fr->callno], cur, list) { @@ -11325,7 +11325,7 @@ immediatedial: break; case IAX_COMMAND_RTKEY: if (!IAX_CALLENCRYPTED(iaxs[fr->callno])) { - ast_log(LOG_WARNING, + ast_log(LOG_WARNING, "we've been told to rotate our encryption key, " "but this isn't an encrypted call. bad things will happen.\n" ); @@ -11609,7 +11609,7 @@ static void *iax2_process_thread(void *data) AST_LIST_UNLOCK(&dynamic_list); if (t) { /* This dynamic thread timed out waiting for a task and was - * not acquired immediately after the timeout, + * not acquired immediately after the timeout, * so it's time to go away. */ ast_mutex_unlock(&thread->lock); break; @@ -11654,7 +11654,7 @@ static void *iax2_process_thread(void *data) thread->iostate = IAX_IOSTATE_PROCESSING; #ifdef SCHED_MULTITHREADED thread->schedfunc(thread->scheddata); -#endif +#endif default: break; } @@ -11662,7 +11662,7 @@ static void *iax2_process_thread(void *data) thread->iostate = IAX_IOSTATE_IDLE; #ifdef DEBUG_SCHED_MULTITHREAD thread->curfunc[0]='\0'; -#endif +#endif /* The network thread added us to the active_thread list when we were given * frames to process, Now that we are done, we must remove ourselves from @@ -11797,7 +11797,7 @@ static int iax2_provision(struct sockaddr_in *end, int sockfd, const char *dest, if (iaxs[callno]) { /* Schedule autodestruct in case they don't ever give us anything back */ - iaxs[callno]->autoid = iax2_sched_replace(iaxs[callno]->autoid, + iaxs[callno]->autoid = iax2_sched_replace(iaxs[callno]->autoid, sched, 15000, auto_hangup, (void *)(long)callno); ast_set_flag64(iaxs[callno], IAX_PROVISION); /* Got a call number now, so go ahead and send the provisioning information */ @@ -11830,7 +11830,7 @@ static int iax2_prov_app(struct ast_channel *chan, const char *data) if (ast_channel_tech(chan) != &iax2_tech) { ast_log(LOG_NOTICE, "Can't provision a non-IAX device!\n"); return -1; - } + } if (!callno || !iaxs[callno] || !iaxs[callno]->addr.sin_addr.s_addr) { ast_log(LOG_NOTICE, "Can't provision something with no IP?\n"); return -1; @@ -11850,7 +11850,7 @@ static char *handle_cli_iax2_provision(struct ast_cli_entry *e, int cmd, struct switch (cmd) { case CLI_INIT: e->command = "iax2 provision"; - e->usage = + e->usage = "Usage: iax2 provision <host> <template> [forced]\n" " Provisions the given peer or IP address using a template\n" " matching either 'template' or '*' if the template is not\n" @@ -11916,7 +11916,7 @@ static int iax2_poke_noanswer(const void *data) peer->pokeexpire = -1; #ifdef SCHED_MULTITHREADED if (schedule_action(__iax2_poke_noanswer, data)) -#endif +#endif __iax2_poke_noanswer(data); peer_unref(peer); return 0; @@ -12179,7 +12179,7 @@ static struct iax2_context *build_context(const char *context) if ((con = ast_calloc(1, sizeof(*con)))) ast_copy_string(con->context, context, sizeof(con->context)); - + return con; } @@ -12404,7 +12404,7 @@ static struct iax2_peer *build_peer(const char *name, struct ast_variable *v, st } else if (!strcasecmp(v->name, "description")) { ast_string_field_set(peer, description, v->value); } else if (!strcasecmp(v->name, "trunk")) { - ast_set2_flag64(peer, ast_true(v->value), IAX_TRUNK); + ast_set2_flag64(peer, ast_true(v->value), IAX_TRUNK); if (ast_test_flag64(peer, IAX_TRUNK) && !timer) { ast_log(LOG_WARNING, "Unable to support trunking on peer '%s' without a timing interface\n", peer->name); ast_clear_flag64(peer, IAX_TRUNK); @@ -12660,7 +12660,7 @@ static struct iax2_user *build_user(const char *name, struct ast_variable *v, st } else { user = ao2_alloc(sizeof(*user), user_destructor); } - + if (user) { if (firstpass) { ast_string_field_free_memory(user); @@ -12710,7 +12710,7 @@ static struct iax2_user *build_user(const char *name, struct ast_variable *v, st *varval = '\0'; varval++; if((tmpvar = ast_variable_new(varname, varval, ""))) { - tmpvar->next = user->vars; + tmpvar->next = user->vars; user->vars = tmpvar; } } @@ -12719,7 +12719,7 @@ static struct iax2_user *build_user(const char *name, struct ast_variable *v, st } else if (!strcasecmp(v->name, "disallow")) { iax2_parse_allow_disallow(&user->prefs, &user->capability,v->value, 0); } else if (!strcasecmp(v->name, "trunk")) { - ast_set2_flag64(user, ast_true(v->value), IAX_TRUNK); + ast_set2_flag64(user, ast_true(v->value), IAX_TRUNK); if (ast_test_flag64(user, IAX_TRUNK) && !timer) { ast_log(LOG_WARNING, "Unable to support trunking on user '%s' without a timing interface\n", user->name); ast_clear_flag64(user, IAX_TRUNK); @@ -13078,12 +13078,12 @@ static int set_config(const char *config_file, int reload, int forced) ast_log(LOG_WARNING, "Invalid cos value, refer to QoS documentation\n"); } while(v) { - if (!strcasecmp(v->name, "bindport")){ + if (!strcasecmp(v->name, "bindport")){ if (reload) ast_log(LOG_NOTICE, "Ignoring bindport on reload\n"); else portno = atoi(v->value); - } else if (!strcasecmp(v->name, "pingtime")) + } else if (!strcasecmp(v->name, "pingtime")) ping_time = atoi(v->value); else if (!strcasecmp(v->name, "iaxthreadcount")) { if (reload) { @@ -13125,19 +13125,19 @@ static int set_config(const char *config_file, int reload, int forced) ast_log(LOG_WARNING, "Disabling RTP checksums is not supported on this operating system!\n"); #endif } - else if (!strcasecmp(v->name, "maxjitterbuffer")) + else if (!strcasecmp(v->name, "maxjitterbuffer")) maxjitterbuffer = atoi(v->value); - else if (!strcasecmp(v->name, "resyncthreshold")) + else if (!strcasecmp(v->name, "resyncthreshold")) resyncthreshold = atoi(v->value); - else if (!strcasecmp(v->name, "maxjitterinterps")) + else if (!strcasecmp(v->name, "maxjitterinterps")) maxjitterinterps = atoi(v->value); else if (!strcasecmp(v->name, "jittertargetextra")) jittertargetextra = atoi(v->value); - else if (!strcasecmp(v->name, "lagrqtime")) + else if (!strcasecmp(v->name, "lagrqtime")) lagrq_time = atoi(v->value); - else if (!strcasecmp(v->name, "maxregexpire")) + else if (!strcasecmp(v->name, "maxregexpire")) max_reg_expire = atoi(v->value); - else if (!strcasecmp(v->name, "minregexpire")) + else if (!strcasecmp(v->name, "minregexpire")) min_reg_expire = atoi(v->value); else if (!strcasecmp(v->name, "bindaddr")) { if (reload) { @@ -13150,7 +13150,7 @@ static int set_config(const char *config_file, int reload, int forced) ast_verb(2, "Binding IAX2 to '%s'\n", v->value); else ast_verb(2, "Binding IAX2 to '%s:%d'\n", v->value, portno); - if (defaultsockfd < 0) + if (defaultsockfd < 0) defaultsockfd = ast_netsock_sockfd(ns); ast_netsock_unref(ns); } @@ -13376,13 +13376,13 @@ static int set_config(const char *config_file, int reload, int forced) min_reg_expire = max_reg_expire; } iax2_capability = capability; - + if (ucfg) { struct ast_variable *gen; int genhasiax; int genregisteriax; const char *hasiax, *registeriax; - + genhasiax = ast_true(ast_variable_retrieve(ucfg, "general", "hasiax")); genregisteriax = ast_true(ast_variable_retrieve(ucfg, "general", "registeriax")); gen = ast_variable_browse(ucfg, "general"); @@ -13430,7 +13430,7 @@ static int set_config(const char *config_file, int reload, int forced) } ast_config_destroy(ucfg); } - + cat = ast_category_browse(cfg, NULL); while(cat) { if (strcasecmp(cat, "general")) { @@ -13488,7 +13488,7 @@ static int reload_config(int forced_reload) ao2_callback(callno_limits, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE, prune_addr_range_cb, NULL); ao2_callback(calltoken_ignores, OBJ_NODATA | OBJ_UNLINK | OBJ_MULTIPLE, prune_addr_range_cb, NULL); ao2_callback(peercnts, OBJ_NODATA, set_peercnt_limit_all_cb, NULL); - trunk_timed = trunk_untimed = 0; + trunk_timed = trunk_untimed = 0; trunk_nmaxmtu = trunk_maxmtu = 0; memset(&debugaddr, '\0', sizeof(debugaddr)); @@ -13500,7 +13500,7 @@ static int reload_config(int forced_reload) /* Qualify hosts, too */ poke_all_peers(); } - + iax_firmware_reload(); iax_provision_reload(1); ast_unload_realtime("iaxpeers"); @@ -13733,7 +13733,7 @@ static struct iax2_dpcache *find_cache(struct ast_channel *chan, const char *dat if (!old && chan) ast_channel_undefer_dtmf(chan); } - return dp; + return dp; } /*! \brief Part of the IAX2 switch interface */ @@ -13821,7 +13821,7 @@ static int iax2_exec(struct ast_channel *chan, const char *context, const char * const char *dialstatus = pbx_builtin_getvar_helper(chan, "DIALSTATUS"); if (dialstatus) { dial = pbx_findapp(dialstatus); - if (dial) + if (dial) pbx_exec(chan, dial, ""); } return -1; @@ -13869,7 +13869,7 @@ static int function_iaxpeer(struct ast_channel *chan, const char *cmd, char *dat unsigned short callno; if (ast_channel_tech(chan) != &iax2_tech) return -1; - callno = PTR_TO_CALLNO(ast_channel_tech_pvt(chan)); + callno = PTR_TO_CALLNO(ast_channel_tech_pvt(chan)); ast_copy_string(buf, iaxs[callno]->addr.sin_addr.s_addr ? ast_inet_ntoa(iaxs[callno]->addr.sin_addr) : "", len); return 0; } @@ -13885,7 +13885,7 @@ static int function_iaxpeer(struct ast_channel *chan, const char *cmd, char *dat if (!strcasecmp(colname, "ip")) { ast_copy_string(buf, ast_sockaddr_stringify_addr(&peer->addr), len); } else if (!strcasecmp(colname, "status")) { - peer_status(peer, buf, len); + peer_status(peer, buf, len); } else if (!strcasecmp(colname, "mailbox")) { ast_copy_string(buf, peer->mailbox, len); } else if (!strcasecmp(colname, "context")) { @@ -14303,7 +14303,7 @@ static int pvt_cmp_cb(void *obj, void *arg, int flags) /* The frames_received field is used to hold whether we're matching * against a full frame or not ... */ - return match(&pvt2->addr, pvt2->peercallno, pvt2->callno, pvt, + return match(&pvt2->addr, pvt2->peercallno, pvt2->callno, pvt, pvt2->frames_received) ? CMP_MATCH | CMP_STOP : 0; } @@ -14568,8 +14568,8 @@ static const struct ast_data_entry iax2_data_providers[] = { * Module loading including tests for configuration or dependencies. * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails - * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the - * configuration file or other non-critical problem return + * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the + * configuration file or other non-critical problem return * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS. */ static int load_module(void) @@ -14619,7 +14619,7 @@ static int load_module(void) return AST_MODULE_LOAD_FAILURE; } ast_netsock_init(netsock); - + outsock = ast_netsock_list_alloc(); if (!outsock) { ast_log(LOG_ERROR, "Could not allocate outsock list.\n"); @@ -14635,7 +14635,7 @@ static int load_module(void) iax_set_output(iax_debug_output); iax_set_error(iax_error_output); jb_setoutput(jb_error_output, jb_warning_output, NULL); - + if ((timer = ast_timer_open())) { ast_timer_set_rate(timer, 1000 / trunkfreq); } @@ -14688,8 +14688,8 @@ static int load_module(void) AST_LIST_LOCK(®istrations); AST_LIST_TRAVERSE(®istrations, reg, entry) iax2_do_register(reg); - AST_LIST_UNLOCK(®istrations); - + AST_LIST_UNLOCK(®istrations); + ao2_callback(peers, 0, peer_set_sock_cb, NULL); ao2_callback(peers, 0, iax2_poke_peer_cb, NULL); diff --git a/channels/chan_mgcp.c b/channels/chan_mgcp.c index ba2328de45a27cd6674b085590ae6d487411a62e..7eeb984566f0940dc20d4243286d965355db99b7 100644 --- a/channels/chan_mgcp.c +++ b/channels/chan_mgcp.c @@ -82,7 +82,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/chanvars.h" #include "asterisk/pktccops.h" #include "asterisk/stasis.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/features_config.h" /* @@ -1143,7 +1143,7 @@ static char *handle_mgcp_set_debug(struct ast_cli_entry *e, int cmd, struct ast_ e->command = "mgcp set debug {on|off}"; e->usage = "Usage: mgcp set debug {on|off}\n" - " Enables/Disables dumping of MGCP packets for debugging purposes\n"; + " Enables/Disables dumping of MGCP packets for debugging purposes\n"; return NULL; case CLI_GENERATE: return NULL; @@ -1451,7 +1451,7 @@ static int mgcp_indicate(struct ast_channel *ast, int ind, const void *data, siz ast_mutex_lock(&sub->lock); switch(ind) { case AST_CONTROL_RINGING: -#ifdef DLINK_BUGGY_FIRMWARE +#ifdef DLINK_BUGGY_FIRMWARE transmit_notify_request(sub, "rt"); #else if (!sub->sdpsent) { /* will hide the inband progress!!! */ @@ -4643,7 +4643,7 @@ static int reload_config(int reload) struct hostent *hp; struct ast_format format; struct ast_flags config_flags = { reload ? CONFIG_FLAG_FILEUNCHANGED : 0 }; - + if (gethostname(ourhost, sizeof(ourhost)-1)) { ast_log(LOG_WARNING, "Unable to get hostname, MGCP disabled\n"); return 0; @@ -4812,8 +4812,8 @@ static int reload_config(int reload) * Module loading including tests for configuration or dependencies. * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails - * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the - * configuration file or other non-critical problem return + * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the + * configuration file or other non-critical problem return * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS. */ static int load_module(void) diff --git a/channels/chan_misdn.c b/channels/chan_misdn.c index 65116a5a932e99addf2bfaea265d1c7263c0ab33..34a134eb4f631f63852f6c5d62acc23f65efbb8f 100644 --- a/channels/chan_misdn.c +++ b/channels/chan_misdn.c @@ -103,7 +103,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/format.h" #include "asterisk/format_cap.h" #include "asterisk/features_config.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "chan_misdn_config.h" #include "isdn_lib.h" @@ -10192,7 +10192,7 @@ cb_events(enum event_e event, struct misdn_bchannel *bc, void *user_data) struct ast_format_cap *cap = ast_format_cap_alloc_nolock(); struct ast_format tmpfmt; if (!(cap)) { - return RESPONSE_ERR; + return RESPONSE_ERR; } ast_format_cap_add(cap, ast_format_set(&tmpfmt, AST_FORMAT_ALAW, 0)); chan = misdn_new(ch, AST_STATE_RESERVED, bc->dialed.number, bc->caller.number, cap, NULL, bc->port, bc->channel); @@ -11277,8 +11277,8 @@ static int unload_module(void) * Module loading including tests for configuration or dependencies. * This function can return AST_MODULE_LOAD_FAILURE, AST_MODULE_LOAD_DECLINE, * or AST_MODULE_LOAD_SUCCESS. If a dependency or environment variable fails - * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the - * configuration file or other non-critical problem return + * tests return AST_MODULE_LOAD_FAILURE. If the module can not load the + * configuration file or other non-critical problem return * AST_MODULE_LOAD_DECLINE. On success return AST_MODULE_LOAD_SUCCESS. */ static int load_module(void) diff --git a/channels/chan_sip.c b/channels/chan_sip.c index ca4b25b7ba56d7faed44edf242ea183cfba13e71..8a68f7aa44849f3d413719cca95004ebc8863e48 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -292,7 +292,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "sip/include/security_events.h" #include "asterisk/sip_api.h" #include "asterisk/app.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/stasis.h" #include "asterisk/stasis_endpoints.h" #include "asterisk/stasis_system.h" diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c index 9bcec1b7d21186966106bd736cbb56bea45b4c8a..c7485470a663d6d2b2afdfc1343586b39dc39e63 100644 --- a/channels/chan_skinny.c +++ b/channels/chan_skinny.c @@ -81,7 +81,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/indications.h" #include "asterisk/linkedlists.h" #include "asterisk/stasis_endpoints.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" /*** DOCUMENTATION <manager name="SKINNYdevices" language="en_US"> @@ -2872,7 +2872,7 @@ static void _transmit_displayprinotifyvar(struct skinny_device *d, const char *t SKINNY_DEBUG(DEBUG_PACKET, 3, "Transmitting DISPLAY_PRINOTIFY_MESSAGE_VARIABLE to %s, '%s', timeout=%d, priority=%d\n", d->name, text, timeout, priority); } - + req->len = (packetlen & ~0x3) + 4; transmit_response(d, req); @@ -6047,7 +6047,7 @@ static void dialandactivatesub(struct skinny_subchannel *sub, char exten[AST_MAX { struct skinny_line *l = sub->line; struct skinny_device *d = l->device; - + if (sub->dialType == DIALTYPE_NORMAL) { SKINNY_DEBUG(DEBUG_SUB, 3, "Sub %d - Dial %s and Activate\n", sub->callid, exten); ast_copy_string(sub->exten, exten, sizeof(sub->exten)); @@ -7803,7 +7803,7 @@ static void config_parse_variables(int type, void *item, struct ast_variable *vp } else if (!strcasecmp(v->name, "disallow")) { ast_parse_allow_disallow(&default_prefs, default_cap, v->value, 0); continue; - } + } } if (!strcasecmp(v->name, "transfer")) { @@ -8384,7 +8384,7 @@ static int config_load(void) memset(&default_prefs, 0, sizeof(default_prefs)); immed_dialchar = '\0'; memset(&vmexten, '\0', sizeof(vmexten)); - + /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); diff --git a/channels/chan_unistim.c b/channels/chan_unistim.c index 53ffa0044c7e63ff8ea56f4630ef42da09c76ab8..661ffd454c38a3d05c2b2b3f7387a90a62244f34 100644 --- a/channels/chan_unistim.c +++ b/channels/chan_unistim.c @@ -4,7 +4,7 @@ * UNISTIM channel driver for asterisk * * Copyright (C) 2005 - 2007, Cedric Hans - * + * * Cedric Hans <cedric.hans@mlkj.net> * * Asterisk 1.4 patch by Peter Be @@ -77,7 +77,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/astobj2.h" #include "asterisk/astdb.h" #include "asterisk/features_config.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #define DEFAULTCONTEXT "default" @@ -215,7 +215,7 @@ static struct ast_jb_conf default_jbconf = .target_extra = 40, }; static struct ast_jb_conf global_jbconf; - + /* #define DUMP_PACKET 1 */ /* #define DEBUG_TIMER ast_verbose */ @@ -568,7 +568,7 @@ static const unsigned char packet_send_jitter_buffer_conf[] = 0x00, 0x00, /* late packet resync 2 bytes */ 0x3e, 0x80 }; -/* Duration in ms div 2 (0x20 = 64ms, 0x08 = 16ms) +/* Duration in ms div 2 (0x20 = 64ms, 0x08 = 16ms) static unsigned char packet_send_StreamBasedToneCad[] = { 0x16, 0x0a, 0x1e, 0x00, duration on 0x0a, duration off 0x0d, duration on 0x0a, duration off 0x0d, duration on 0x0a, duration off 0x2b }; */ static const unsigned char packet_send_open_audio_stream_rx[] = @@ -688,11 +688,11 @@ static int unistim_indicate(struct ast_channel *ast, int ind, const void *data, size_t datalen); static int unistim_fixup(struct ast_channel *oldchan, struct ast_channel *newchan); static int unistim_senddigit_begin(struct ast_channel *ast, char digit); -static int unistim_senddigit_end(struct ast_channel *ast, char digit, +static int unistim_senddigit_end(struct ast_channel *ast, char digit, unsigned int duration); static int unistim_sendtext(struct ast_channel *ast, const char *text); -static int write_entry_history(struct unistimsession *pte, FILE * f, char c, +static int write_entry_history(struct unistimsession *pte, FILE * f, char c, char *line1); static void change_callerid(struct unistimsession *pte, int type, char *callerid); @@ -766,7 +766,7 @@ static const char *ustmtext(const char *str, struct unistimsession *pte) struct ustm_lang_entry le_search; struct unistim_languages *lang = NULL; int size; - + if (pte->device) { lang = &options_languages[find_language(pte->device->language)]; } @@ -3042,7 +3042,7 @@ static void handle_call_outgoing(struct unistimsession *s) } if (!(sub = unistim_alloc_sub(s->device, SUB_REAL))) { ast_log(LOG_WARNING, "Unable to allocate subchannel!\n"); - return; + return; } sub->parent = s->device->sline[softkey]; s->device->ssub[softkey] = sub; @@ -3436,7 +3436,7 @@ static void key_dial_page(struct unistimsession *pte, char keycode) pte->device->phone_number[i + 1] = 0; show_phone_number(pte); - if (ast_exists_extension(NULL, pte->device->context, pte->device->phone_number, 1, NULL) && + if (ast_exists_extension(NULL, pte->device->context, pte->device->phone_number, 1, NULL) && !ast_matchmore_extension(NULL, pte->device->context, pte->device->phone_number, 1, NULL)) { keycode = KEY_FUNC1; } else { @@ -4849,7 +4849,7 @@ static int unistim_hangup(struct ast_channel *ast) send_text(TEXT_LINE2, TEXT_NORMAL, s, ustmtext("is on-line", s)); send_text_status(s, ustmtext(" Transf Hangup", s)); send_favorite_short(sub->softkey, FAV_ICON_OFFHOOK_BLACK, s); - + } } if (s->state == STATE_CALL && sub->subtype == SUB_REAL) { @@ -5136,7 +5136,7 @@ static void in_band_indication(struct ast_channel *ast, const struct ast_tone_zo } } -static int unistim_indicate(struct ast_channel *ast, int ind, const void *data, +static int unistim_indicate(struct ast_channel *ast, int ind, const void *data, size_t datalen) { struct unistim_subchannel *sub; @@ -6020,7 +6020,7 @@ static char *unistim_do_debug(struct ast_cli_entry *e, int cmd, struct ast_cli_a case CLI_INIT: e->command = "unistim set debug {on|off}"; e->usage = - "Usage: unistim set debug\n" + "Usage: unistim set debug\n" " Display debug messages.\n"; return NULL; @@ -6053,7 +6053,7 @@ static char *unistim_reload(struct ast_cli_entry *e, int cmd, struct ast_cli_arg case CLI_INIT: e->command = "unistim reload"; e->usage = - "Usage: unistim reload\n" + "Usage: unistim reload\n" " Reloads UNISTIM configuration from unistim.conf\n"; return NULL; @@ -6577,7 +6577,7 @@ static int reload_config(void) ast_log(LOG_ERROR, "Config file %s is in an invalid format. Aborting.\n", config); return -1; } - + /* Copy the default jb config over global_jbconf */ memcpy(&global_jbconf, &default_jbconf, sizeof(struct ast_jb_conf)); diff --git a/channels/dahdi/bridge_native_dahdi.c b/channels/dahdi/bridge_native_dahdi.c index 963b02155bc1c9b13cd2fddf1d778867b99cf7bb..13e1a84ddfae3713340088fa43c53c318536db22 100644 --- a/channels/dahdi/bridge_native_dahdi.c +++ b/channels/dahdi/bridge_native_dahdi.c @@ -42,8 +42,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/astobj.h" #include "bridge_native_dahdi.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_technology.h" #include "asterisk/frame.h" /* ------------------------------------------------------------------- */ diff --git a/channels/sig_analog.c b/channels/sig_analog.c index d80f68535e4311f96ff2389fc74346606eb94277..9effae1f1515e45d37fee0dde6f8ec81a58dabc0 100644 --- a/channels/sig_analog.c +++ b/channels/sig_analog.c @@ -43,7 +43,7 @@ #include "asterisk/features.h" #include "asterisk/causes.h" #include "asterisk/features_config.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "sig_analog.h" @@ -1830,7 +1830,7 @@ static void *__analog_ss_thread(void *data) case ANALOG_SIG_SF_FEATDMF: res = analog_my_getsigstr(chan, dtmfbuf + 1, "#", 3000); /* if international caca, do it again to get real ANO */ - if ((p->sig == ANALOG_SIG_FEATDMF) && (dtmfbuf[1] != '0') + if ((p->sig == ANALOG_SIG_FEATDMF) && (dtmfbuf[1] != '0') && (strlen(dtmfbuf) != 14)) { if (analog_wink(p, idx)) { goto quit; @@ -2351,7 +2351,7 @@ static void *__analog_ss_thread(void *data) /* If set to use DTMF CID signalling, listen for DTMF */ if (p->cid_signalling == CID_SIG_DTMF) { int k = 0; - int oldlinearity; + int oldlinearity; int timeout_ms; int ms; struct timeval start = ast_tvnow(); diff --git a/channels/sig_pri.c b/channels/sig_pri.c index 5f07928783a7cda61b17937afe8655a39be48131..f281f449859680974897c474bd462387c3ff1dbe 100644 --- a/channels/sig_pri.c +++ b/channels/sig_pri.c @@ -112,7 +112,7 @@ #include "asterisk/transcap.h" #include "asterisk/features.h" #include "asterisk/aoc.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/stasis_channels.h" #include "sig_pri.h" @@ -4792,7 +4792,7 @@ static const char *sig_pri_moh_event_str(enum sig_pri_moh_event event) * \since 10.0 * * \param pvt Channel private control structure. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -4836,7 +4836,7 @@ static enum sig_pri_moh_state sig_pri_moh_retrieve_call(struct sig_pri_chan *pvt * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -4900,7 +4900,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_idle(struct ast_channel *chan, str * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -4940,7 +4940,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_notify(struct ast_channel *chan, s * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -4977,7 +4977,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_moh(struct ast_channel *chan, stru * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -5022,7 +5022,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_hold_req(struct ast_channel *chan, * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -5063,7 +5063,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_pend_unhold(struct ast_channel *ch * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -5105,7 +5105,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_hold(struct ast_channel *chan, str * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -5147,7 +5147,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_retrieve_req(struct ast_channel *c * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -5225,7 +5225,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_pend_hold(struct ast_channel *chan * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -5265,7 +5265,7 @@ static enum sig_pri_moh_state sig_pri_moh_fsm_retrieve_fail(struct ast_channel * * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -5298,7 +5298,7 @@ static const sig_pri_moh_fsm_state sig_pri_moh_fsm[SIG_PRI_MOH_STATE_NUM] = { * \param chan Channel to post event to (Usually pvt->owner) * \param pvt Channel private control structure. * \param event MOH event to process. - * + * * \note Assumes the pvt->pri->lock is already obtained. * \note Assumes the sig_pri_lock_private(pvt) is already obtained. * @@ -9270,7 +9270,7 @@ int sig_pri_start_pri(struct sig_pri_span *pri) * * \param p Channel private pointer. * \param noalarm Non-zero if not in alarm mode. - * + * * \note Assumes the sig_pri_lock_private(p) is already obtained. * * \return Nothing diff --git a/funcs/func_channel.c b/funcs/func_channel.c index f4aa76322b9ccdc175ba9f3667f7f177845f7176..3f2ef5cb633c382eec0e482b4f2e6ceab761256f 100644 --- a/funcs/func_channel.c +++ b/funcs/func_channel.c @@ -37,15 +37,15 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/pbx.h" #include "asterisk/utils.h" #include "asterisk/app.h" #include "asterisk/indications.h" #include "asterisk/stringfields.h" #include "asterisk/global_datastores.h" -#include "asterisk/bridging_basic.h" -#include "asterisk/bridging_after.h" +#include "asterisk/bridge_basic.h" +#include "asterisk/bridge_after.h" /*** DOCUMENTATION <function name="CHANNELS" language="en_US"> diff --git a/include/asterisk/bridging.h b/include/asterisk/bridge.h similarity index 99% rename from include/asterisk/bridging.h rename to include/asterisk/bridge.h index 7e22dba648d9c6f5178077b82efc427b4194de55..3d7cf4e068a575f64feaeb0748a3fdd4213688d9 100644 --- a/include/asterisk/bridging.h +++ b/include/asterisk/bridge.h @@ -69,9 +69,9 @@ extern "C" { #endif -#include "asterisk/bridging_features.h" -#include "asterisk/bridging_channel.h" -#include "asterisk/bridging_roles.h" +#include "asterisk/bridge_features.h" +#include "asterisk/bridge_channel.h" +#include "asterisk/bridge_roles.h" #include "asterisk/dsp.h" #include "asterisk/uuid.h" diff --git a/include/asterisk/bridging_after.h b/include/asterisk/bridge_after.h similarity index 100% rename from include/asterisk/bridging_after.h rename to include/asterisk/bridge_after.h diff --git a/include/asterisk/bridging_basic.h b/include/asterisk/bridge_basic.h similarity index 100% rename from include/asterisk/bridging_basic.h rename to include/asterisk/bridge_basic.h diff --git a/include/asterisk/bridging_channel.h b/include/asterisk/bridge_channel.h similarity index 99% rename from include/asterisk/bridging_channel.h rename to include/asterisk/bridge_channel.h index f58fba7dcaa6cf63ca860cc98062fae611bccb4b..5da1653faa9100e9833812979aabc32fc64177a4 100644 --- a/include/asterisk/bridging_channel.h +++ b/include/asterisk/bridge_channel.h @@ -53,7 +53,7 @@ extern "C" { #endif -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge_technology.h" /*! \brief State information about a bridged channel */ enum bridge_channel_state { diff --git a/include/asterisk/bridging_channel_internal.h b/include/asterisk/bridge_channel_internal.h similarity index 100% rename from include/asterisk/bridging_channel_internal.h rename to include/asterisk/bridge_channel_internal.h diff --git a/include/asterisk/bridging_features.h b/include/asterisk/bridge_features.h similarity index 100% rename from include/asterisk/bridging_features.h rename to include/asterisk/bridge_features.h diff --git a/include/asterisk/bridging_internal.h b/include/asterisk/bridge_internal.h similarity index 100% rename from include/asterisk/bridging_internal.h rename to include/asterisk/bridge_internal.h diff --git a/include/asterisk/bridging_roles.h b/include/asterisk/bridge_roles.h similarity index 100% rename from include/asterisk/bridging_roles.h rename to include/asterisk/bridge_roles.h diff --git a/include/asterisk/bridging_technology.h b/include/asterisk/bridge_technology.h similarity index 100% rename from include/asterisk/bridging_technology.h rename to include/asterisk/bridge_technology.h diff --git a/include/asterisk/core_unreal.h b/include/asterisk/core_unreal.h index 751c5d45565a0c5a9fda9a65f278290c7e39cc13..c7a82ef921be3d57576731e186d19d033e905c6f 100644 --- a/include/asterisk/core_unreal.h +++ b/include/asterisk/core_unreal.h @@ -31,7 +31,7 @@ #include "asterisk/astobj2.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/abstract_jb.h" #if defined(__cplusplus) || defined(c_plusplus) diff --git a/include/asterisk/doxygen/architecture.h b/include/asterisk/doxygen/architecture.h index 5d5c706d2e383a22021fe5f506974d8a074c6f20..9cf15c723d88ab47cbe563633ac8b651e13a1f4e 100644 --- a/include/asterisk/doxygen/architecture.h +++ b/include/asterisk/doxygen/architecture.h @@ -53,7 +53,7 @@ -# \ref ArchConceptBridging -# \ref ArchCodeFlows -# \ref ArchCodeFlowPlayback - -# \ref ArchCodeFlowBridge + -# \ref ArchCodeFlowBridge -# \ref ArchDataStructures -# \ref ArchAstobj2 -# \ref ArchLinkedLists @@ -258,11 +258,14 @@ in the source tree. For a list of bridge technology implementations, see \ref bridges. For additional information on the bridging API, see -<code>include/asterisk/bridging.h</code> and -<code>include/asterisk/bridging_technology.h</code>. +\arg <code>include/asterisk/bridge.h</code> +\arg <code>include/asterisk/bridge_technology.h</code> +\arg <code>include/asterisk/bridge_channel.h</code> +\arg <code>include/asterisk/bridge_features.h</code> +\arg <code>include/asterisk/bridge_after.h</code> For additional implementation details regarding the core bridging API, see -<code>main/bridging.c</code>. +<code>main/bridging.c</code> and <code>main/bridging_channel.c</code>. \subsection ArchInterfaceCDR Call Detail Record (CDR) Handlers @@ -436,7 +439,7 @@ Asterisk CLI operates using connections to a UNIX %domain socket. There are other miscellaneous threads throughout the system that perform a specific task. For example, the event API (include/asterisk/event.h) uses a thread internally (main/event.c) to handle asychronous event dispatching. The devicestate API -(include/asterisk/devicestate.h) uses a thread internally (main/devicestate.c) +(include/asterisk/devicestate.h) uses a thread internally (main/devicestate.c) to asynchronously process device state changes. diff --git a/include/asterisk/features.h b/include/asterisk/features.h index 96eec98c86a60e1727046502dd63e306ca048bb0..5293e65057ef5203cddb63582360c33d21ad7c34 100644 --- a/include/asterisk/features.h +++ b/include/asterisk/features.h @@ -26,7 +26,7 @@ #include "asterisk/pbx.h" #include "asterisk/linkedlists.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #define FEATURE_MAX_LEN 11 #define FEATURE_APP_LEN 64 diff --git a/include/asterisk/stasis_bridging.h b/include/asterisk/stasis_bridges.h similarity index 99% rename from include/asterisk/stasis_bridging.h rename to include/asterisk/stasis_bridges.h index 336d7dd5d79bf371e791de85942d8953a08575a9..973b00c4760ea7d0e4eab3fe60cdcfa68ef708e4 100644 --- a/include/asterisk/stasis_bridging.h +++ b/include/asterisk/stasis_bridges.h @@ -28,7 +28,7 @@ extern "C" { #include "asterisk/lock.h" #include "asterisk/linkedlists.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/pbx.h" /*! diff --git a/main/bridging.c b/main/bridge.c similarity index 99% rename from main/bridging.c rename to main/bridge.c index 1e1e6c763d22eb0c48fb95864738c81fb3201012..bb90de7e470df8726f1f951069ed521ba7ffea8c 100644 --- a/main/bridging.c +++ b/main/bridge.c @@ -37,14 +37,14 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/lock.h" #include "asterisk/linkedlists.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_internal.h" -#include "asterisk/bridging_channel_internal.h" -#include "asterisk/bridging_basic.h" -#include "asterisk/bridging_technology.h" -#include "asterisk/bridging_channel.h" -#include "asterisk/bridging_after.h" -#include "asterisk/stasis_bridging.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_internal.h" +#include "asterisk/bridge_channel_internal.h" +#include "asterisk/bridge_basic.h" +#include "asterisk/bridge_technology.h" +#include "asterisk/bridge_channel.h" +#include "asterisk/bridge_after.h" +#include "asterisk/stasis_bridges.h" #include "asterisk/stasis_channels.h" #include "asterisk/app.h" #include "asterisk/file.h" diff --git a/main/bridging_after.c b/main/bridge_after.c similarity index 99% rename from main/bridging_after.c rename to main/bridge_after.c index 8ab4bc842232739b5e76a3b33dc2750dc8b3085c..7a693952c24ff9e1b84d6e71d6eb51290586a7a0 100644 --- a/main/bridging_after.c +++ b/main/bridge_after.c @@ -37,7 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/logger.h" #include "asterisk/channel.h" #include "asterisk/pbx.h" -#include "asterisk/bridging_after.h" +#include "asterisk/bridge_after.h" struct after_bridge_cb_node { /*! Next list node. */ diff --git a/main/bridging_basic.c b/main/bridge_basic.c similarity index 99% rename from main/bridging_basic.c rename to main/bridge_basic.c index 7f9cb71fdb668f9e47e4636cc3cf8112244e70c8..7eaf30eb939e888ec98915ff3b27cc552186cdb0 100644 --- a/main/bridging_basic.c +++ b/main/bridge_basic.c @@ -34,17 +34,17 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" #include "asterisk/utils.h" #include "asterisk/linkedlists.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_basic.h" -#include "asterisk/bridging_after.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_internal.h" +#include "asterisk/bridge_basic.h" +#include "asterisk/bridge_after.h" #include "asterisk/astobj2.h" #include "asterisk/features_config.h" #include "asterisk/pbx.h" #include "asterisk/file.h" #include "asterisk/app.h" -#include "asterisk/bridging_internal.h" #include "asterisk/dial.h" -#include "asterisk/stasis_bridging.h" +#include "asterisk/stasis_bridges.h" #define NORMAL_FLAGS (AST_BRIDGE_FLAG_DISSOLVE_HANGUP | AST_BRIDGE_FLAG_DISSOLVE_EMPTY \ | AST_BRIDGE_FLAG_SMART) diff --git a/main/bridging_channel.c b/main/bridge_channel.c similarity index 99% rename from main/bridging_channel.c rename to main/bridge_channel.c index 284f08732d62d0fc3b15e04263c7425240ddba07..1164e4f67de5889a8c351ac6d1167b0d5ea1a866 100644 --- a/main/bridging_channel.c +++ b/main/bridge_channel.c @@ -43,12 +43,12 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/channel.h" #include "asterisk/timing.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_channel.h" -#include "asterisk/bridging_after.h" -#include "asterisk/bridging_channel_internal.h" -#include "asterisk/bridging_internal.h" -#include "asterisk/stasis_bridging.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_channel.h" +#include "asterisk/bridge_after.h" +#include "asterisk/bridge_channel_internal.h" +#include "asterisk/bridge_internal.h" +#include "asterisk/stasis_bridges.h" #include "asterisk/stasis_channels.h" #include "asterisk/musiconhold.h" #include "asterisk/features_config.h" diff --git a/main/bridging_roles.c b/main/bridge_roles.c similarity index 99% rename from main/bridging_roles.c rename to main/bridge_roles.c index c20b0ccf14e4d2299aa2771dfd12246d551001f1..dd1012b9cc2dd154a8f038a6412985d64a27fa54 100644 --- a/main/bridging_roles.c +++ b/main/bridge_roles.c @@ -39,8 +39,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" #include "asterisk/datastore.h" #include "asterisk/linkedlists.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_roles.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_roles.h" #include "asterisk/stringfields.h" struct bridge_role_option { diff --git a/main/cel.c b/main/cel.c index 9d21cc8f522f337de55ed29e4503866e69be62c3..f66fbdcc0bebfb887bfa7eb711ab483ceebafff8 100644 --- a/main/cel.c +++ b/main/cel.c @@ -58,8 +58,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/astobj2.h" #include "asterisk/stasis_message_router.h" #include "asterisk/stasis_channels.h" -#include "asterisk/stasis_bridging.h" -#include "asterisk/bridging.h" +#include "asterisk/stasis_bridges.h" +#include "asterisk/bridge.h" #include "asterisk/parking.h" #include "asterisk/features.h" #include "asterisk/core_local.h" diff --git a/main/channel.c b/main/channel.c index bdcdef5b978459d9e7a7275d858bea8d1e440150..9c4a0ba7aeff218a451b6bbdf25af345f7e6ef8c 100644 --- a/main/channel.c +++ b/main/channel.c @@ -72,7 +72,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/data.h" #include "asterisk/channel_internal.h" #include "asterisk/features.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/test.h" #include "asterisk/stasis_channels.h" diff --git a/main/cli.c b/main/cli.c index 34951711fbf9b1f834d159add0b3a780b24f9934..b4c3b34c78885b8fe04c1a056904c339af3cc0ee 100644 --- a/main/cli.c +++ b/main/cli.c @@ -60,7 +60,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/lock.h" #include "asterisk/threadstorage.h" #include "asterisk/translate.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/stasis_channels.h" #include "asterisk/stasis_bridging.h" diff --git a/main/core_local.c b/main/core_local.c index b35e03110b7d265c00bb07e15f6d9e7cf804417c..961a28096027a08d9949a36e1c664b9faabcc497 100644 --- a/main/core_local.c +++ b/main/core_local.c @@ -43,7 +43,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/manager.h" #include "asterisk/devicestate.h" #include "asterisk/astobj2.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/core_unreal.h" #include "asterisk/core_local.h" #include "asterisk/stasis.h" diff --git a/main/core_unreal.c b/main/core_unreal.c index 3d14a716f4fe55bae1549502c21ef6200a163283..7b7595b8791d6f202c71c852b0966a8cac4156e3 100644 --- a/main/core_unreal.c +++ b/main/core_unreal.c @@ -39,7 +39,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/pbx.h" #include "asterisk/musiconhold.h" #include "asterisk/astobj2.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/core_unreal.h" static unsigned int name_sequence = 0; diff --git a/main/features.c b/main/features.c index d1b33d5b94005ad6c2c9404b667eb96ccb28d775..346e4afd427f3a9b3f1a92bb7218454f397433a7 100644 --- a/main/features.c +++ b/main/features.c @@ -71,9 +71,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/global_datastores.h" #include "asterisk/astobj2.h" #include "asterisk/test.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_basic.h" -#include "asterisk/bridging_after.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_basic.h" +#include "asterisk/bridge_after.h" #include "asterisk/stasis.h" #include "asterisk/stasis_channels.h" #include "asterisk/features_config.h" diff --git a/main/manager.c b/main/manager.c index c0f91f5f86ec25a0238ba6179b82248cc603e477..319f8b088756cda7b3296243f85f4904b33f3427 100644 --- a/main/manager.c +++ b/main/manager.c @@ -97,7 +97,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/stasis_bridging.h" #include "asterisk/test.h" #include "asterisk/json.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/features_config.h" #include "asterisk/rtp_engine.h" diff --git a/main/manager_bridging.c b/main/manager_bridges.c similarity index 100% rename from main/manager_bridging.c rename to main/manager_bridges.c diff --git a/main/parking.c b/main/parking.c index 02695cd01ceac3fcf3546f2a284382d3e4d1906f..820cffdea335deda97bcf0ce43f02486f483eeeb 100644 --- a/main/parking.c +++ b/main/parking.c @@ -30,7 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/_private.h" #include "asterisk/astobj2.h" #include "asterisk/pbx.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/parking.h" #include "asterisk/channel.h" #include "asterisk/_private.h" diff --git a/main/stasis_bridging.c b/main/stasis_bridges.c similarity index 99% rename from main/stasis_bridging.c rename to main/stasis_bridges.c index 43ec006a192041ae7fe9e1f908bf24f40ae47b41..97c93e6f9957c838de755c53f0a5c2737c6fce79 100644 --- a/main/stasis_bridging.c +++ b/main/stasis_bridges.c @@ -36,8 +36,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/channel.h" #include "asterisk/stasis_bridging.h" #include "asterisk/stasis_channels.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_technology.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_technology.h" #define SNAPSHOT_CHANNELS_BUCKETS 13 diff --git a/main/stasis_channels.c b/main/stasis_channels.c index 36a953e262667d27ea21b779ae02786638c3af0d..c71bbbd141f631645fbcf682137510622ffcd967 100644 --- a/main/stasis_channels.c +++ b/main/stasis_channels.c @@ -35,7 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/astobj2.h" #include "asterisk/json.h" #include "asterisk/pbx.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/translate.h" #include "asterisk/stasis.h" #include "asterisk/stasis_channels.h" diff --git a/res/parking/parking_applications.c b/res/parking/parking_applications.c index f7e27976610e53a6f697679d8b731c033587d337..4e52e21d7d7b7f859c71c3c8d62d483aca411a7a 100644 --- a/res/parking/parking_applications.c +++ b/res/parking/parking_applications.c @@ -38,7 +38,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/app.h" #include "asterisk/say.h" #include "asterisk/features.h" -#include "asterisk/bridging_basic.h" +#include "asterisk/bridge_basic.h" /*** DOCUMENTATION <application name="Park" language="en_US"> diff --git a/res/parking/parking_bridge.c b/res/parking/parking_bridge.c index 4c919983007e59276ea8cf8fa3ca38d7376b4c9c..04250bf25adae118c0d9db4a73812fe6968a4360 100644 --- a/res/parking/parking_bridge.c +++ b/res/parking/parking_bridge.c @@ -30,7 +30,7 @@ #include "asterisk/say.h" #include "asterisk/term.h" #include "asterisk/features.h" -#include "asterisk/bridging_internal.h" +#include "asterisk/bridge_internal.h" struct ast_bridge_parking { diff --git a/res/parking/parking_bridge_features.c b/res/parking/parking_bridge_features.c index 15d4980d2b45cf02f72081d9608e7ebe083693eb..1b57f9c075a3e3252443564012df788cbb87c683 100644 --- a/res/parking/parking_bridge_features.c +++ b/res/parking/parking_bridge_features.c @@ -32,10 +32,10 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/astobj2.h" #include "asterisk/logger.h" #include "asterisk/pbx.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_internal.h" -#include "asterisk/bridging_channel.h" -#include "asterisk/bridging_features.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_internal.h" +#include "asterisk/bridge_channel.h" +#include "asterisk/bridge_features.h" #include "asterisk/features.h" #include "asterisk/say.h" #include "asterisk/datastore.h" diff --git a/res/parking/parking_controller.c b/res/parking/parking_controller.c index ec34cd48347f0b567ded80646043a0e72d6009d0..0e91ebe7f50aec749645c007b268ba92fe10ef7a 100644 --- a/res/parking/parking_controller.c +++ b/res/parking/parking_controller.c @@ -31,7 +31,7 @@ #include "asterisk/manager.h" #include "asterisk/test.h" #include "asterisk/features.h" -#include "asterisk/bridging_basic.h" +#include "asterisk/bridge_basic.h" struct ast_bridge *parking_lot_get_bridge(struct parking_lot *lot) { diff --git a/res/parking/parking_manager.c b/res/parking/parking_manager.c index 02858d8bfa5ad2ab2a5df7475a99bf6fdee656d2..430d5408ae964448f4c1f56a8b1ef0810cf63a27 100644 --- a/res/parking/parking_manager.c +++ b/res/parking/parking_manager.c @@ -37,7 +37,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/astobj2.h" #include "asterisk/features.h" #include "asterisk/manager.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" /*** DOCUMENTATION <manager name="Parkinglots" language="en_US"> diff --git a/res/parking/res_parking.h b/res/parking/res_parking.h index 78ad9117dcaf194a6566ea351b37d71036708928..b2e56347d0e1b78704e2d7f4c02ebf613b1b6fa9 100644 --- a/res/parking/res_parking.h +++ b/res/parking/res_parking.h @@ -24,7 +24,7 @@ */ #include "asterisk/pbx.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/parking.h" #include "asterisk/stasis_channels.h" diff --git a/res/res_sip_refer.c b/res/res_sip_refer.c index 48c7e6dba8f8a296c822bad408f7f2138b6c5b79..098f4bdd0c5a65dce4ecf67128b91211bef2298a 100644 --- a/res/res_sip_refer.c +++ b/res/res_sip_refer.c @@ -34,7 +34,7 @@ #include "asterisk/module.h" #include "asterisk/pbx.h" #include "asterisk/taskprocessor.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/framehook.h" /*! \brief REFER Progress structure */ diff --git a/res/res_stasis_bridge_add.c b/res/res_stasis_bridge_add.c index 5ff3b255e46ecaefee6d4688d045f4fa6f721ac8..ce13155604f82afc103f4412b0b120e25fa210f0 100644 --- a/res/res_stasis_bridge_add.c +++ b/res/res_stasis_bridge_add.c @@ -34,7 +34,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/module.h" #include "asterisk/stasis_app_impl.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" static void *app_control_join_bridge(struct stasis_app_control *control, struct ast_channel *chan, void *data) diff --git a/res/stasis/control.c b/res/stasis/control.c index 50da8b9f09b1f6ed89f06ef24c793d0dd70164d2..1fbae0c7c9a04dadebe81266ff94c84902fc1f57 100644 --- a/res/stasis/control.c +++ b/res/stasis/control.c @@ -32,9 +32,9 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "command.h" #include "control.h" #include "asterisk/dial.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_basic.h" -#include "asterisk/bridging_features.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_basic.h" +#include "asterisk/bridge_features.h" #include "asterisk/frame.h" #include "asterisk/pbx.h" #include "asterisk/musiconhold.h" diff --git a/res/stasis_http/resource_bridges.c b/res/stasis_http/resource_bridges.c index b378eb8a5f23eeff9e4df0c2e136ce8d663658d3..ea5ec061153967264ad3ec3cbddd380b43a2baf9 100644 --- a/res/stasis_http/resource_bridges.c +++ b/res/stasis_http/resource_bridges.c @@ -40,7 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/stasis_channels.h" #include "asterisk/core_unreal.h" #include "asterisk/channel.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/format_cap.h" #include "asterisk/file.h" diff --git a/res/stasis_http/resource_channels.c b/res/stasis_http/resource_channels.c index 38befbdc18a88913040b096ddc65567b5cf4cd46..592cd6df577ae8f03e4003bee72375c6098be728 100644 --- a/res/stasis_http/resource_channels.c +++ b/res/stasis_http/resource_channels.c @@ -35,7 +35,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/file.h" #include "asterisk/pbx.h" #include "asterisk/dial.h" -#include "asterisk/bridging.h" +#include "asterisk/bridge.h" #include "asterisk/callerid.h" #include "asterisk/stasis_app.h" #include "asterisk/stasis_app_playback.h" diff --git a/tests/test_cdr.c b/tests/test_cdr.c index 670334c13a229c61e1d19212e7b43b7b83cbf34e..888f86afbef6ad6b52bf5638daa5f24c1860a02f 100644 --- a/tests/test_cdr.c +++ b/tests/test_cdr.c @@ -42,8 +42,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/causes.h" #include "asterisk/time.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_basic.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_basic.h" #include "asterisk/stasis_channels.h" #include "asterisk/stasis_bridging.h" diff --git a/tests/test_cel.c b/tests/test_cel.c index 61d864bd96b50c6536147ec330ce1617f2c6fb95..4f00e38c6f17a4407307dcb8f8160aaa907c9030 100644 --- a/tests/test_cel.c +++ b/tests/test_cel.c @@ -43,8 +43,8 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include "asterisk/utils.h" #include "asterisk/causes.h" #include "asterisk/time.h" -#include "asterisk/bridging.h" -#include "asterisk/bridging_basic.h" +#include "asterisk/bridge.h" +#include "asterisk/bridge_basic.h" #include "asterisk/stasis_channels.h" #include "asterisk/stasis_bridging.h" #include "asterisk/json.h"