[asterisk-commits] rmudgett: branch group/bridge_construction r382766 - in /team/group/bridge_co...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Mar 8 19:07:24 CST 2013


Author: rmudgett
Date: Fri Mar  8 19:07:20 2013
New Revision: 382766

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=382766
Log:
Add notes about changing ast_bridge_join() features parameter.

Modified:
    team/group/bridge_construction/include/asterisk/bridging.h
    team/group/bridge_construction/main/bridging.c

Modified: team/group/bridge_construction/include/asterisk/bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/include/asterisk/bridging.h?view=diff&rev=382766&r1=382765&r2=382766
==============================================================================
--- team/group/bridge_construction/include/asterisk/bridging.h (original)
+++ team/group/bridge_construction/include/asterisk/bridging.h Fri Mar  8 19:07:20 2013
@@ -394,8 +394,12 @@
  * \param bridge Bridge to impart on
  * \param chan Channel to impart
  * \param swap Channel to swap out if swapping.  NULL if not swapping.
- * \param features Bridge features structure. Must be NULL or obtained by ast_bridge_features_new().
+ * \param features Bridge features structure.
  * \param independent TRUE if caller does not want to reclaim the channel using ast_bridge_depart().
+ *
+ * \note The features parameter must be NULL or obtained by
+ * ast_bridge_features_new().  You must not dereference features
+ * after calling.
  *
  * \retval 0 on success
  * \retval -1 on failure
@@ -424,7 +428,7 @@
  * \note If you impart a channel as not independent you MUST
  * ast_bridge_depart() the channel.  The bridge channel thread
  * is created join-able.  The implication is that the channel is
- * special and is not intended to be moved to another bridge.
+ * special and will not behave like a normal channel.
  *
  * \note If you impart a channel as independent you must not
  * ast_bridge_depart() the channel.  The bridge channel thread

Modified: team/group/bridge_construction/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/main/bridging.c?view=diff&rev=382766&r1=382765&r2=382766
==============================================================================
--- team/group/bridge_construction/main/bridging.c (original)
+++ team/group/bridge_construction/main/bridging.c Fri Mar  8 19:07:20 2013
@@ -2097,6 +2097,17 @@
 	__after_bridge_set_goto(chan, 0, 0, context, exten, priority, p_goto);
 }
 
+/*
+ * BUGBUG make ast_bridge_join() require features to be allocated just like ast_bridge_impart() and not expect the struct back.
+ *
+ * This change is really going to break ConfBridge.  All other
+ * users are easily changed.  However, it is needed so the
+ * bridging code can manipulate features on all channels
+ * consistently no matter how they joined.
+ *
+ * Need to update the features parameter doxygen when this
+ * change is made to be like ast_bridge_impart().
+ */
 enum ast_bridge_channel_state ast_bridge_join(struct ast_bridge *bridge,
 	struct ast_channel *chan,
 	struct ast_channel *swap,
@@ -2699,6 +2710,7 @@
 	return cmp;
 }
 
+/* BUGBUG make ast_bridge_features_init() static when make ast_bridge_join() requires features to be allocated. */
 int ast_bridge_features_init(struct ast_bridge_features *features)
 {
 	/* Zero out the structure */
@@ -2717,6 +2729,7 @@
 	return 0;
 }
 
+/* BUGBUG make ast_bridge_features_cleanup() static when make ast_bridge_join() requires features to be allocated. */
 void ast_bridge_features_cleanup(struct ast_bridge_features *features)
 {
 	struct ast_bridge_hook *hook;




More information about the asterisk-commits mailing list