[asterisk-commits] file: branch file/bridging r161517 - in /team/file/bridging: include/asterisk...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Dec 5 17:58:18 CST 2008


Author: file
Date: Fri Dec  5 17:58:17 2008
New Revision: 161517

URL: http://svn.digium.com/view/asterisk?view=rev&rev=161517
Log:
Make the function that handles data reading and writing a public API call that is to be used by bridging technologies.

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

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=161517&r1=161516&r2=161517
==============================================================================
--- team/file/bridging/include/asterisk/bridging.h (original)
+++ team/file/bridging/include/asterisk/bridging.h Fri Dec  5 17:58:17 2008
@@ -321,6 +321,26 @@
  */
 int ast_bridge_technology_unregister(struct ast_bridge_technology *technology);
 
+/*! \brief Feed notification that a frame is waiting on a channel into the bridging core
+ *
+ * \param bridge
+ * \param bridge_channel
+ * \param chan
+ * \param outfd
+ *
+ * Example usage:
+ *
+ * \code
+ * ast_bridge_handle_trip(bridge, NULL, chan, -1);
+ * \endcode
+ *
+ * This tells the bridging core that a frame has been received on
+ * the channel pointed to by chan and that it should be read and handled.
+ *
+ * \note This should only be used by bridging technologies.
+ */
+void ast_bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_channel *chan, int outfd);
+
 /*! \brief Create a new bridge
  *
  * \param capabilities The capabilities that we require to be used on the bridge

Modified: team/file/bridging/main/bridging.c
URL: http://svn.digium.com/view/asterisk/team/file/bridging/main/bridging.c?view=diff&rev=161517&r1=161516&r2=161517
==============================================================================
--- team/file/bridging/main/bridging.c (original)
+++ team/file/bridging/main/bridging.c Fri Dec  5 17:58:17 2008
@@ -250,8 +250,7 @@
 	return frame;
 }
 
-/*! \brief Internal function to handle when a channel or bridge needs servicing */
-static void bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_channel *chan, int outfd)
+void ast_bridge_handle_trip(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_channel *chan, int outfd)
 {
 	/* If no bridge channel has been provided and the actual channel has been provided find it */
 	if (chan && !bridge_channel)
@@ -317,7 +316,7 @@
 		ao2_lock(bridge);
 
 		/* Process whatever they did */
-		bridge_handle_trip(bridge, NULL, winner, -1);
+		ast_bridge_handle_trip(bridge, NULL, winner, -1);
 	}
 
 	return 0;
@@ -666,7 +665,7 @@
 	ao2_lock(bridge_channel->bridge);
 
 	if (!bridge_channel->suspended) {
-		bridge_handle_trip(bridge_channel->bridge, bridge_channel, chan, outfd);
+		ast_bridge_handle_trip(bridge_channel->bridge, bridge_channel, chan, outfd);
 	}
 
 	return bridge_channel->state;




More information about the asterisk-commits mailing list