[svn-commits] mmichelson: branch mmichelson/atxfer_features r392749 - in /team/mmichelson/a...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Jun 24 14:32:42 CDT 2013


Author: mmichelson
Date: Mon Jun 24 14:32:41 2013
New Revision: 392749

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=392749
Log:
Create a header of private bridge functions.

This starts this file off by placing bridge_merge_do() and
bridge_move_do() into the header. These functions are going
to need to be accessible from bridging_basic.c.


Added:
    team/mmichelson/atxfer_features/include/asterisk/bridging_private.h   (with props)
Modified:
    team/mmichelson/atxfer_features/main/bridging.c

Added: team/mmichelson/atxfer_features/include/asterisk/bridging_private.h
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/include/asterisk/bridging_private.h?view=auto&rev=392749
==============================================================================
--- team/mmichelson/atxfer_features/include/asterisk/bridging_private.h (added)
+++ team/mmichelson/atxfer_features/include/asterisk/bridging_private.h Mon Jun 24 14:32:41 2013
@@ -1,0 +1,70 @@
+/*
+ * Asterisk -- An open source telephony toolkit.
+ *
+ * Copyright (C) 2013 Digium, Inc.
+ *
+ * Mark Michelson <mmichelson at digium.com>
+ *
+ * See http://www.asterisk.org for more information about
+ * the Asterisk project. Please do not directly contact
+ * any of the maintainers of this project for assistance;
+ * the project provides a web site, mailing lists and IRC
+ * channels for your use.
+ *
+ * This program is free software, distributed under the terms of
+ * the GNU General Public License Version 2. See the LICENSE file
+ * at the top of the source tree.
+ */
+
+/*!
+ * \file
+ * \brief Private Bridging API
+ *
+ * \author Mark Michelson <mmichelson at digium.com>
+ *
+ * See Also:
+ * \arg \ref AstCREDITS
+ */
+
+#ifndef _ASTERISK_PRIVATE_BRIDGING_H
+#define _ASTERISK_PRIVATE_BRIDGING_H
+
+struct ast_bridge;
+struct ast_bridge_channel;
+
+/*!
+ * \brief Move a bridge channel from one bridge to another.
+ * \since 12.0.0
+ *
+ * \param dst_bridge Destination bridge of bridge channel move.
+ * \param bridge_channel Channel moving from one bridge to another.
+ * \param attempt_recovery TRUE if failure attempts to push channel back into original bridge.
+ *
+ * \note The dst_bridge and bridge_channel->bridge are assumed already locked.
+ *
+ * \retval 0 on success.
+ * \retval -1 on failure.
+ */
+int bridge_move_do(struct ast_bridge *dst_bridge, struct ast_bridge_channel *bridge_channel,
+		int attempt_recovery);
+
+/*!
+ * \brief Do the merge of two bridges.
+ * \since 12.0.0
+ *
+ * \param dst_bridge Destination bridge of merge.
+ * \param src_bridge Source bridge of merge.
+ * \param kick_me Array of channels to kick from the bridges.
+ * \param num_kick Number of channels in the kick_me array.
+ *
+ * \return Nothing
+ *
+ * \note The two bridges are assumed already locked.
+ *
+ * This moves the channels in src_bridge into the bridge pointed
+ * to by dst_bridge.
+ */
+void bridge_merge_do(struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge,
+		struct ast_bridge_channel **kick_me, unsigned int num_kick);
+
+#endif /* _ASTERISK_PRIVATE_BRIDGING_H */

Propchange: team/mmichelson/atxfer_features/include/asterisk/bridging_private.h
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: team/mmichelson/atxfer_features/include/asterisk/bridging_private.h
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Propchange: team/mmichelson/atxfer_features/include/asterisk/bridging_private.h
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: team/mmichelson/atxfer_features/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/atxfer_features/main/bridging.c?view=diff&rev=392749&r1=392748&r2=392749
==============================================================================
--- team/mmichelson/atxfer_features/main/bridging.c (original)
+++ team/mmichelson/atxfer_features/main/bridging.c Mon Jun 24 14:32:41 2013
@@ -62,6 +62,7 @@
 #include "asterisk/parking.h"
 #include "asterisk/core_local.h"
 #include "asterisk/features_config.h"
+#include "asterisk/bridging_private.h"
 
 /*! All bridges container. */
 static struct ao2_container *bridges;
@@ -3885,7 +3886,7 @@
  * This moves the channels in src_bridge into the bridge pointed
  * to by dst_bridge.
  */
-static void bridge_merge_do(struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge, struct ast_bridge_channel **kick_me, unsigned int num_kick)
+void bridge_merge_do(struct ast_bridge *dst_bridge, struct ast_bridge *src_bridge, struct ast_bridge_channel **kick_me, unsigned int num_kick)
 {
 	struct ast_bridge_channel *bridge_channel;
 	unsigned int idx;
@@ -4143,21 +4144,7 @@
 	return res;
 }
 
-/*!
- * \internal
- * \brief Move a bridge channel from one bridge to another.
- * \since 12.0.0
- *
- * \param dst_bridge Destination bridge of bridge channel move.
- * \param bridge_channel Channel moving from one bridge to another.
- * \param attempt_recovery TRUE if failure attempts to push channel back into original bridge.
- *
- * \note The dst_bridge and bridge_channel->bridge are assumed already locked.
- *
- * \retval 0 on success.
- * \retval -1 on failure.
- */
-static int bridge_move_do(struct ast_bridge *dst_bridge, struct ast_bridge_channel *bridge_channel, int attempt_recovery)
+int bridge_move_do(struct ast_bridge *dst_bridge, struct ast_bridge_channel *bridge_channel, int attempt_recovery)
 {
 	struct ast_bridge *orig_bridge;
 	int was_in_bridge;




More information about the svn-commits mailing list