[asterisk-commits] mjordan: trunk r395378 - in /trunk: apps/ apps/confbridge/ apps/confbridge/in...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jul 24 23:06:39 CDT 2013


Author: mjordan
Date: Wed Jul 24 23:06:32 2013
New Revision: 395378

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395378
Log:
A great big renaming patch

This patch renames the bridging* files to bridge*. This may seem pedantic
and silly, but it fits better in line with current Asterisk naming conventions:
* channel is not "channeling"
* monitor is not "monitoring"
etc.

A bridge is an object. It is a first class citizen in Asterisk. "Bridging" is
the act of using a bridge on a set of channels - and the API that fulfills that
role is more than just the action.

(closes issue ASTERISK-22130)

Added:
    trunk/include/asterisk/bridge.h   (with props)
    trunk/include/asterisk/bridge_after.h   (with props)
    trunk/include/asterisk/bridge_basic.h   (with props)
    trunk/include/asterisk/bridge_channel.h   (with props)
    trunk/include/asterisk/bridge_channel_internal.h   (with props)
    trunk/include/asterisk/bridge_features.h   (with props)
    trunk/include/asterisk/bridge_internal.h   (with props)
    trunk/include/asterisk/bridge_roles.h   (with props)
    trunk/include/asterisk/bridge_technology.h   (with props)
    trunk/include/asterisk/stasis_bridges.h   (with props)
    trunk/main/bridge.c   (with props)
    trunk/main/bridge_after.c   (with props)
    trunk/main/bridge_basic.c   (with props)
    trunk/main/bridge_channel.c   (with props)
    trunk/main/bridge_roles.c   (with props)
    trunk/main/manager_bridges.c   (with props)
    trunk/main/stasis_bridges.c   (with props)
Removed:
    trunk/include/asterisk/bridging.h
    trunk/include/asterisk/bridging_after.h
    trunk/include/asterisk/bridging_basic.h
    trunk/include/asterisk/bridging_channel.h
    trunk/include/asterisk/bridging_channel_internal.h
    trunk/include/asterisk/bridging_features.h
    trunk/include/asterisk/bridging_internal.h
    trunk/include/asterisk/bridging_roles.h
    trunk/include/asterisk/bridging_technology.h
    trunk/include/asterisk/stasis_bridging.h
    trunk/main/bridging.c
    trunk/main/bridging_after.c
    trunk/main/bridging_basic.c
    trunk/main/bridging_channel.c
    trunk/main/bridging_roles.c
    trunk/main/manager_bridging.c
    trunk/main/stasis_bridging.c
Modified:
    trunk/apps/app_agent_pool.c
    trunk/apps/app_bridgewait.c
    trunk/apps/app_confbridge.c
    trunk/apps/app_dial.c
    trunk/apps/app_dumpchan.c
    trunk/apps/app_queue.c
    trunk/apps/confbridge/conf_chan_announce.c
    trunk/apps/confbridge/conf_chan_record.c
    trunk/apps/confbridge/conf_config_parser.c
    trunk/apps/confbridge/confbridge_manager.c
    trunk/apps/confbridge/include/confbridge.h
    trunk/bridges/bridge_builtin_features.c
    trunk/bridges/bridge_builtin_interval_features.c
    trunk/bridges/bridge_holding.c
    trunk/bridges/bridge_native_rtp.c
    trunk/bridges/bridge_simple.c
    trunk/bridges/bridge_softmix.c
    trunk/channels/chan_bridge_media.c
    trunk/channels/chan_dahdi.c
    trunk/channels/chan_iax2.c
    trunk/channels/chan_mgcp.c
    trunk/channels/chan_misdn.c
    trunk/channels/chan_sip.c
    trunk/channels/chan_skinny.c
    trunk/channels/chan_unistim.c
    trunk/channels/dahdi/bridge_native_dahdi.c
    trunk/channels/sig_analog.c
    trunk/channels/sig_pri.c
    trunk/funcs/func_channel.c
    trunk/include/asterisk/core_unreal.h
    trunk/include/asterisk/doxygen/architecture.h
    trunk/include/asterisk/features.h
    trunk/main/cel.c
    trunk/main/channel.c
    trunk/main/cli.c
    trunk/main/core_local.c
    trunk/main/core_unreal.c
    trunk/main/features.c
    trunk/main/manager.c
    trunk/main/parking.c
    trunk/main/stasis_channels.c
    trunk/res/parking/parking_applications.c
    trunk/res/parking/parking_bridge.c
    trunk/res/parking/parking_bridge_features.c
    trunk/res/parking/parking_controller.c
    trunk/res/parking/parking_manager.c
    trunk/res/parking/res_parking.h
    trunk/res/res_sip_refer.c
    trunk/res/res_stasis_bridge_add.c
    trunk/res/stasis/control.c
    trunk/res/stasis_http/resource_bridges.c
    trunk/res/stasis_http/resource_channels.c
    trunk/tests/test_cdr.c
    trunk/tests/test_cel.c

Modified: trunk/apps/app_agent_pool.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_agent_pool.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/app_agent_pool.c (original)
+++ trunk/apps/app_agent_pool.c Wed Jul 24 23:06:32 2013
@@ -40,10 +40,10 @@
 #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 @@
 	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 @@
 	}
 
 	/* 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);

Modified: trunk/apps/app_bridgewait.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_bridgewait.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/app_bridgewait.c (original)
+++ trunk/apps/app_bridgewait.c Wed Jul 24 23:06:32 2013
@@ -45,7 +45,7 @@
 #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

Modified: trunk/apps/app_confbridge.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_confbridge.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/app_confbridge.c (original)
+++ trunk/apps/app_confbridge.c Wed Jul 24 23:06:32 2013
@@ -32,7 +32,7 @@
  * \addtogroup configuration_file Configuration Files
  */
 
-/*! 
+/*!
  * \page confbridge.conf confbridge.conf
  * \verbinclude confbridge.conf.sample
  */
@@ -58,7 +58,7 @@
 #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 @@
 #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 @@
 		</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 @@
 			</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 @@
 			"       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 @@
 		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 @@
  * 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)

Modified: trunk/apps/app_dial.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dial.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/app_dial.c (original)
+++ trunk/apps/app_dial.c Wed Jul 24 23:06:32 2013
@@ -66,8 +66,7 @@
 #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

Modified: trunk/apps/app_dumpchan.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_dumpchan.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/app_dumpchan.c (original)
+++ trunk/apps/app_dumpchan.c Wed Jul 24 23:06:32 2013
@@ -41,7 +41,7 @@
 #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 @@
 		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)),

Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Wed Jul 24 23:06:32 2013
@@ -108,8 +108,7 @@
 #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 */

Modified: trunk/apps/confbridge/conf_chan_announce.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_chan_announce.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/confbridge/conf_chan_announce.c (original)
+++ trunk/apps/confbridge/conf_chan_announce.c Wed Jul 24 23:06:32 2013
@@ -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"
 

Modified: trunk/apps/confbridge/conf_chan_record.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_chan_record.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/confbridge/conf_chan_record.c (original)
+++ trunk/apps/confbridge/conf_chan_record.c Wed Jul 24 23:06:32 2013
@@ -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"
 
 /* ------------------------------------------------------------------- */

Modified: trunk/apps/confbridge/conf_config_parser.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/conf_config_parser.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/confbridge/conf_config_parser.c (original)
+++ trunk/apps/confbridge/conf_config_parser.c Wed Jul 24 23:06:32 2013
@@ -36,7 +36,7 @@
 #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"
 

Modified: trunk/apps/confbridge/confbridge_manager.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/confbridge_manager.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/confbridge/confbridge_manager.c (original)
+++ trunk/apps/confbridge/confbridge_manager.c Wed Jul 24 23:06:32 2013
@@ -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"

Modified: trunk/apps/confbridge/include/confbridge.h
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/confbridge/include/confbridge.h?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/apps/confbridge/include/confbridge.h (original)
+++ trunk/apps/confbridge/include/confbridge.h Wed Jul 24 23:06:32 2013
@@ -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 */

Modified: trunk/bridges/bridge_builtin_features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_builtin_features.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/bridges/bridge_builtin_features.c (original)
+++ trunk/bridges/bridge_builtin_features.c Wed Jul 24 23:06:32 2013
@@ -41,8 +41,8 @@
 
 #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"

Modified: trunk/bridges/bridge_builtin_interval_features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_builtin_interval_features.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/bridges/bridge_builtin_interval_features.c (original)
+++ trunk/bridges/bridge_builtin_interval_features.c Wed Jul 24 23:06:32 2013
@@ -40,7 +40,7 @@
 
 #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"

Modified: trunk/bridges/bridge_holding.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_holding.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/bridges/bridge_holding.c (original)
+++ trunk/bridges/bridge_holding.c Wed Jul 24 23:06:32 2013
@@ -44,8 +44,8 @@
 
 #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"
 

Modified: trunk/bridges/bridge_native_rtp.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_native_rtp.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/bridges/bridge_native_rtp.c (original)
+++ trunk/bridges/bridge_native_rtp.c Wed Jul 24 23:06:32 2013
@@ -41,8 +41,8 @@
 
 #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"
 

Modified: trunk/bridges/bridge_simple.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_simple.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/bridges/bridge_simple.c (original)
+++ trunk/bridges/bridge_simple.c Wed Jul 24 23:06:32 2013
@@ -41,8 +41,8 @@
 
 #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)

Modified: trunk/bridges/bridge_softmix.c
URL: http://svnview.digium.com/svn/asterisk/trunk/bridges/bridge_softmix.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/bridges/bridge_softmix.c (original)
+++ trunk/bridges/bridge_softmix.c Wed Jul 24 23:06:32 2013
@@ -45,8 +45,8 @@
 
 #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"

Modified: trunk/channels/chan_bridge_media.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_bridge_media.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/channels/chan_bridge_media.c (original)
+++ trunk/channels/chan_bridge_media.c Wed Jul 24 23:06:32 2013
@@ -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"
 

Modified: trunk/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_dahdi.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/channels/chan_dahdi.c (original)
+++ trunk/channels/chan_dahdi.c Wed Jul 24 23:06:32 2013
@@ -124,7 +124,7 @@
 #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 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 @@
 #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 @@
 	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 @@
 		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 @@
 			/* 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 @@
 						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 @@
 							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 @@
 									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 @@
 	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 @@
 
 	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 @@
 	}
 	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 @@
 #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 @@
 	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 @@
  * 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)

Modified: trunk/channels/chan_iax2.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_iax2.c?view=diff&rev=395378&r1=395377&r2=395378
==============================================================================
--- trunk/channels/chan_iax2.c (original)
+++ trunk/channels/chan_iax2.c Wed Jul 24 23:06:32 2013
@@ -27,7 +27,7 @@
  * \arg \ref Config_iax
  *
  * \ingroup channel_drivers
- * 
+ *
  * \todo Implement musicclass settings for IAX2 devices
  */
 
@@ -67,7 +67,7 @@
 #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 @@
 #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 @@
 	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 @@
 #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 @@
 
 /*!
  *  * \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 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 @@
  * \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 @@
 		tmp = NULL;
 		return NULL;
 	}
-		
+
 	tmp->prefs = prefs;
 	tmp->pingid = -1;
 	tmp->lagid = -1;
@@ -2199,9 +2199,9 @@
 
 	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 @@
 	return 0;
 }
 
-/*! 
+/*!
  * \internal
  *
  * \brief compares sin to calltoken_ignores table to determine if validation is required.
@@ -2360,12 +2360,12 @@
 	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 @@
 	peercnt->limit = limit;
 }
 
-/*! 
+/*!
  * \internal
  * \brief sets limits for all peercnts in table. done on reload to reflect changes in conf.
  */
@@ -2406,9 +2406,9 @@
 	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 @@
 	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 @@
 	}
 }
 
-/*! 
+/*!
  * \internal
  * \brief adds an ip to the peercnts table, increments connection count if it already exists
  *
@@ -2502,7 +2502,7 @@
 	return res;
 }
 
-/*! 
+/*!
  * \internal
  * \brief decrements a peercnts table entry
  */
@@ -2528,7 +2528,7 @@
 	ao2_unlock(peercnts);
 }
 
-/*! 
+/*!
  * \internal
  * \brief called by scheduler to decrement object
  */
@@ -2542,7 +2542,7 @@
 	return 0;
 }
 
-/*! 
+/*!
  * \internal
  * \brief decrements peercnts connection count, finds by addr
  */
@@ -2560,7 +2560,7 @@
 	return 0;
 }
 
-/*! 
+/*!
  * \internal
  * \brief Create callno_limit entry based on configuration
  */
@@ -2615,7 +2615,7 @@
 	}
 }
 
-/*! 
+/*!
  * \internal
  * \brief Create calltoken_ignores entry based on configuration
  */
@@ -2901,9 +2901,9 @@
 		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 @@
 			};
 
 			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 @@
 	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 @@
  *
  * \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 @@
 	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 @@
 	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 @@
 {
 #ifdef SCHED_MULTITHREADED
 	if (schedule_action(__attempt_transmit, data))
-#endif		
+#endif
 		__attempt_transmit(data);
 	return 0;
 }
@@ -3624,7 +3624,7 @@
 		} else {
 			ast_copy_string(status, "UNKNOWN", statuslen);
 		}
-	} else { 
+	} else {
 		ast_copy_string(status, "Unmonitored", statuslen);
 		res = -1;
 	}
@@ -3703,7 +3703,7 @@
 		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 @@
 	}
 
 	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 changed from %d to %d\n", global_max_trunk_mtu, mtuv); 
-	global_max_trunk_mtu = mtuv; 
+		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;
 	return CLI_SUCCESS;
 }
 
@@ -3960,7 +3960,7 @@
 	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 @@
 	}
 
 	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 @@
 		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 @@
 			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 @@
 {
 #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_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 @@
 			if (strcasecmp(tmp->value, "friend") &&
 			    strcasecmp(tmp->value, "user")) {
 				return NULL;
-			} 
+			}
 		}
 		tmp = tmp->next;
 	}
@@ -4431,8 +4431,8 @@
 
 	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 @@
 {
 #ifdef SCHED_MULTITHREADED
 	if (schedule_action(__auto_congest, data))
-#endif		
+#endif
 		__auto_congest(data);
 	return 0;
 }
@@ -4674,16 +4674,16 @@
 		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 @@
  * \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 @@

[... 18806 lines stripped ...]



More information about the asterisk-commits mailing list