[asterisk-commits] rmudgett: branch rmudgett/bridge_phase r385390 - in /team/rmudgett/bridge_pha...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Apr 11 17:39:37 CDT 2013


Author: rmudgett
Date: Thu Apr 11 17:39:33 2013
New Revision: 385390

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=385390
Log:
Move call to ast_bridge_publish_state() to a more convient location.

Modified:
    team/rmudgett/bridge_phase/include/asterisk/bridging.h
    team/rmudgett/bridge_phase/main/bridging.c

Modified: team/rmudgett/bridge_phase/include/asterisk/bridging.h
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bridge_phase/include/asterisk/bridging.h?view=diff&rev=385390&r1=385389&r2=385390
==============================================================================
--- team/rmudgett/bridge_phase/include/asterisk/bridging.h (original)
+++ team/rmudgett/bridge_phase/include/asterisk/bridging.h Thu Apr 11 17:39:33 2013
@@ -408,7 +408,7 @@
  * \param bridge What to register. (Tolerates a NULL pointer)
  *
  * \code
- * struct ast_bridge *ast_bridge_basic_new(uint32_t capabilities, int flags)
+ * struct ast_bridge *ast_bridge_basic_new(uint32_t capabilities, int flags, uint32 dtmf_features)
  * {
  *     void *bridge;
  *

Modified: team/rmudgett/bridge_phase/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/rmudgett/bridge_phase/main/bridging.c?view=diff&rev=385390&r1=385389&r2=385390
==============================================================================
--- team/rmudgett/bridge_phase/main/bridging.c (original)
+++ team/rmudgett/bridge_phase/main/bridging.c Thu Apr 11 17:39:33 2013
@@ -1209,9 +1209,12 @@
 
 struct ast_bridge *ast_bridge_register(struct ast_bridge *bridge)
 {
-	if (bridge && !ao2_link(bridges, bridge)) {
-		ast_bridge_destroy(bridge);
-		bridge = NULL;
+	if (bridge) {
+		ast_bridge_publish_state(bridge);
+		if (!ao2_link(bridges, bridge)) {
+			ast_bridge_destroy(bridge);
+			bridge = NULL;
+		}
 	}
 	return bridge;
 }
@@ -1410,9 +1413,6 @@
 	bridge = ast_bridge_alloc(sizeof(struct ast_bridge), &ast_bridge_base_v_table);
 	bridge = ast_bridge_base_init(bridge, capabilities, flags);
 	bridge = ast_bridge_register(bridge);
-	if (bridge) {
-		ast_bridge_publish_state(bridge);
-	}
 	return bridge;
 }
 




More information about the asterisk-commits mailing list