[asterisk-commits] rmudgett: branch group/bridge_construction r386142 - in /team/group/bridge_co...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 19 13:07:43 CDT 2013
Author: rmudgett
Date: Fri Apr 19 13:07:39 2013
New Revision: 386142
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386142
Log:
Separate bridge and bridge channel feature flags.
* Made the bridge/bridge-channel feature flags function parameters
unsigned since a flag does not have a sign.
Modified:
team/group/bridge_construction/include/asterisk/bridging.h
team/group/bridge_construction/include/asterisk/bridging_features.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=386142&r1=386141&r2=386142
==============================================================================
--- team/group/bridge_construction/include/asterisk/bridging.h (original)
+++ team/group/bridge_construction/include/asterisk/bridging.h Fri Apr 19 13:07:39 2013
@@ -480,7 +480,7 @@
* This creates a no frills two party bridge that will be
* destroyed once one of the channels hangs up.
*/
-struct ast_bridge *ast_bridge_base_init(struct ast_bridge *self, uint32_t capabilities, int flags);
+struct ast_bridge *ast_bridge_base_init(struct ast_bridge *self, uint32_t capabilities, unsigned int flags);
/*!
* \brief Create a new base class bridge
@@ -501,7 +501,7 @@
* This creates a no frills two party bridge that will be
* destroyed once one of the channels hangs up.
*/
-struct ast_bridge *ast_bridge_base_new(uint32_t capabilities, int flags);
+struct ast_bridge *ast_bridge_base_new(uint32_t capabilities, unsigned int flags);
/*!
* \brief Try locking the bridge.
Modified: team/group/bridge_construction/include/asterisk/bridging_features.h
URL: http://svnview.digium.com/svn/asterisk/team/group/bridge_construction/include/asterisk/bridging_features.h?view=diff&rev=386142&r1=386141&r2=386142
==============================================================================
--- team/group/bridge_construction/include/asterisk/bridging_features.h (original)
+++ team/group/bridge_construction/include/asterisk/bridging_features.h Fri Apr 19 13:07:39 2013
@@ -42,9 +42,14 @@
AST_BRIDGE_FLAG_MERGE_INHIBIT_TO = (1 << 4),
/*! Bridge channels can be moved to another bridge only by masquerade (ConfBridge) */
AST_BRIDGE_FLAG_MASQUERADE_ONLY = (1 << 5),
-
+};
+
+/*! \brief Flags used for per bridge channel features */
+enum ast_bridge_channel_feature_flags {
+ /*! Upon channel hangup all bridge participants should be kicked out. */
+ AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP = (1 << 0),
/*! This channel leaves the bridge if all participants have this flag set. */
- AST_BRIDGE_FLAG_LONELY = (1 << 10),
+ AST_BRIDGE_CHANNEL_FLAG_LONELY = (1 << 1),
};
/*! \brief Built in DTMF features */
@@ -608,9 +613,9 @@
int ast_bridge_features_set_limits(struct ast_bridge_features *features, struct ast_bridge_features_limits *limits, int remove_on_pull);
/*!
- * \brief Set a flag on a bridge features structure
- *
- * \param features Bridge features structure
+ * \brief Set a flag on a bridge channel features structure
+ *
+ * \param features Bridge channel features structure
* \param flag Flag to enable
*
* \return Nothing
@@ -620,13 +625,13 @@
* \code
* struct ast_bridge_features features;
* ast_bridge_features_init(&features);
- * ast_bridge_features_set_flag(&features, AST_BRIDGE_FLAG_DISSOLVE_HANGUP);
- * \endcode
- *
- * This sets the AST_BRIDGE_FLAG_DISSOLVE_HANGUP feature to be
- * enabled on the features structure 'features'.
- */
-void ast_bridge_features_set_flag(struct ast_bridge_features *features, enum ast_bridge_feature_flags flag);
+ * ast_bridge_features_set_flag(&features, AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP);
+ * \endcode
+ *
+ * This sets the AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP feature
+ * to be enabled on the features structure 'features'.
+ */
+void ast_bridge_features_set_flag(struct ast_bridge_features *features, unsigned int flag);
/*!
* \brief Initialize bridge features structure
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=386142&r1=386141&r2=386142
==============================================================================
--- team/group/bridge_construction/main/bridging.c (original)
+++ team/group/bridge_construction/main/bridging.c Fri Apr 19 13:07:39 2013
@@ -469,7 +469,7 @@
if (ast_test_flag(&bridge->feature_flags, AST_BRIDGE_FLAG_DISSOLVE_HANGUP)
|| (bridge_channel->features->usable
&& ast_test_flag(&bridge_channel->features->feature_flags,
- AST_BRIDGE_FLAG_DISSOLVE_HANGUP))) {
+ AST_BRIDGE_CHANNEL_FLAG_DISSOLVE_HANGUP))) {
bridge_dissolve(bridge);
return;
}
@@ -1245,7 +1245,7 @@
return bridge;
}
-struct ast_bridge *ast_bridge_base_init(struct ast_bridge *self, uint32_t capabilities, int flags)
+struct ast_bridge *ast_bridge_base_init(struct ast_bridge *self, uint32_t capabilities, unsigned int flags)
{
if (!self) {
return NULL;
@@ -1406,7 +1406,7 @@
.notify_masquerade = bridge_base_notify_masquerade,
};
-struct ast_bridge *ast_bridge_base_new(uint32_t capabilities, int flags)
+struct ast_bridge *ast_bridge_base_new(uint32_t capabilities, unsigned int flags)
{
void *bridge;
@@ -3534,7 +3534,7 @@
return -1;
}
-void ast_bridge_features_set_flag(struct ast_bridge_features *features, enum ast_bridge_feature_flags flag)
+void ast_bridge_features_set_flag(struct ast_bridge_features *features, unsigned int flag)
{
ast_set_flag(&features->feature_flags, flag);
features->usable = 1;
More information about the asterisk-commits
mailing list