[svn-commits] file: branch file/bridging r90430 - in /team/file/bridging: apps/ include/ast...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Dec 1 20:02:05 CST 2007


Author: file
Date: Sat Dec  1 20:02:05 2007
New Revision: 90430

URL: http://svn.digium.com/view/asterisk?view=rev&rev=90430
Log:
Get rid of the ast_bridge_swap API call, swapping is going to be part of ast_bridge_join and ast_bridge_impart.

Modified:
    team/file/bridging/apps/app_bridgetest.c
    team/file/bridging/apps/app_confbridge.c
    team/file/bridging/include/asterisk/bridging.h
    team/file/bridging/main/bridging.c

Modified: team/file/bridging/apps/app_bridgetest.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_bridgetest.c?view=diff&rev=90430&r1=90429&r2=90430
==============================================================================
--- team/file/bridging/apps/app_bridgetest.c (original)
+++ team/file/bridging/apps/app_bridgetest.c Sat Dec  1 20:02:05 2007
@@ -92,9 +92,9 @@
 	}
 
 	/* Put the dialed channel into the bridge via async */
-	ast_bridge_impart(bridge, ast_dial_answered(dial), NULL);
+	ast_bridge_impart(bridge, ast_dial_answered(dial), NULL, NULL);
 
-	ast_bridge_join(bridge, chan, NULL);
+	ast_bridge_join(bridge, chan, NULL, NULL);
 	
 	ast_bridge_destroy(bridge);
 

Modified: team/file/bridging/apps/app_confbridge.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/apps/app_confbridge.c?view=diff&rev=90430&r1=90429&r2=90430
==============================================================================
--- team/file/bridging/apps/app_confbridge.c (original)
+++ team/file/bridging/apps/app_confbridge.c Sat Dec  1 20:02:05 2007
@@ -150,7 +150,7 @@
 		ast_bridge_features_hook(&features, "#", (ast_test_flag(&flags, OPTION_ADMIN) ? menu_callback_admin : menu_callback_user));
 
 	/* Actually join the bridge */
-	ast_bridge_join(conference_bridge->bridge, chan, &features);
+	ast_bridge_join(conference_bridge->bridge, chan, NULL, &features);
 
 	/* Drop ourselves from the conference bridge and remove it if needed */
 	AST_LIST_LOCK(&conference_bridges);

Modified: team/file/bridging/include/asterisk/bridging.h
URL: http://svn.digium.com/view/asterisk/team/file/bridging/include/asterisk/bridging.h?view=diff&rev=90430&r1=90429&r2=90430
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Sat Dec  1 20:02:05 2007
@@ -161,18 +161,20 @@
 /*! \brief Join a channel to a bridge
  * \param bridge Bridge to join
  * \param chan Channel to join
+ * \param swap Channel to swap out if swapping
  * \param features Bridge features structure
  * \return Returns state that channel exited bridge on
  */
-enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_bridge_features *features);
+enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features);
 
 /*! \brief Impart a channel on a bridge
  * \param bridge Bridge to impart on
  * \param chan Channel to impart
- * \param features Bridge features structure
- * \return Returns 0 on success, -1 on failure
- */
-int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_bridge_features *features);
+ * \param swap Channel to swap out if swapping
+ * \param features Bridge features structure
+ * \return Returns 0 on success, -1 on failure
+ */
+int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features);
 
 /*! \brief Depart a channel from a bridge
  * \param bridge Bridge to depart from
@@ -205,14 +207,6 @@
  */
 void ast_bridge_technology_unsuspend(struct ast_bridge_technology *technology);
 
-/*! \brief Swap a channel participating in a bridge
- * \param bridge Bridge channel is involved in
- * \param chan0 Old channel already in bridge
- * \param chan1 New channel that will be taking it's place
- * \return Returns 0 on success, -1 on failure
- */
-int ast_bridge_swap(struct ast_bridge *bridge, struct ast_channel *chan0, struct ast_channel *chan1);
-
 /*! \brief Attach a custom hook to a bridge features structure
  * \param features Bridge features structure
  * \param dtmf DTMF string to be activated upon

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=90430&r1=90429&r2=90430
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Sat Dec  1 20:02:05 2007
@@ -669,7 +669,7 @@
  * \param chan Channel to join
  * \return Returns phase that channel exited bridge on
  */
-enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_bridge_features *features)
+enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features)
 {
 	struct ast_bridge_channel bridge_channel;
 	enum ast_bridge_channel_state state;
@@ -756,7 +756,7 @@
  * \param chan Channel to impart
  * \return Returns 0 on success, -1 on failure
  */
-int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_bridge_features *features)
+int ast_bridge_impart(struct ast_bridge *bridge, struct ast_channel *chan, struct ast_channel *swap, struct ast_bridge_features *features)
 {
 	struct ast_bridge_channel *bridge_channel = NULL;
 	int i = 0;
@@ -884,17 +884,6 @@
 	return;
 }
 
-/*! \brief Swap a channel participating in a bridge
- * \param bridge Bridge channel is involved in
- * \param chan0 Old channel already in bridge
- * \param chan1 New channel that will be taking it's place
- * \return Returns 0 on success, -1 on failure
- */
-int ast_bridge_swap(struct ast_bridge *bridge, struct ast_channel *chan0, struct ast_channel *chan1)
-{
-	return -1;
-}
-
 /*! \brief Attach a custom hook to a bridge features structure
  * \param features Bridge features structure
  * \param dtmf DTMF string to be activated upon




More information about the svn-commits mailing list