[asterisk-commits] kmoore: branch kmoore/stasis-bridging_events-rework r390027 - /team/kmoore/st...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed May 29 11:04:22 CDT 2013
Author: kmoore
Date: Wed May 29 11:04:18 2013
New Revision: 390027
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=390027
Log:
Do some cleanup of the bridge_destroy function
Modified:
team/kmoore/stasis-bridging_events-rework/res/res_stasis.c
Modified: team/kmoore/stasis-bridging_events-rework/res/res_stasis.c
URL: http://svnview.digium.com/svn/asterisk/team/kmoore/stasis-bridging_events-rework/res/res_stasis.c?view=diff&rev=390027&r1=390026&r2=390027
==============================================================================
--- team/kmoore/stasis-bridging_events-rework/res/res_stasis.c (original)
+++ team/kmoore/stasis-bridging_events-rework/res/res_stasis.c Wed May 29 11:04:18 2013
@@ -431,18 +431,14 @@
return bridge;
}
-static void bridge_destroy(struct ast_bridge *bridge)
-{
+void stasis_app_bridge_destroy(const char *bridge_id)
+{
+ struct ast_bridge *bridge = stasis_app_bridge_find_by_id(bridge_id);
if (!bridge) {
return;
}
ao2_unlink(app_bridges, bridge);
ast_bridge_destroy(bridge);
-}
-
-void stasis_app_bridge_destroy(const char *bridge_id)
-{
- bridge_destroy(ao2_find(app_bridges, bridge_id, OBJ_KEY));
}
int app_send_start_msg(struct app *app, struct ast_channel *chan,
@@ -812,7 +808,7 @@
* structure */
msg = stasis_json_event_bridge_destroyed_create(old_snapshot);
ao2_callback(watching_apps, OBJ_NODATA, remove_bridge_cb, bridge_id);
- bridge_destroy(stasis_app_bridge_find_by_id(old_snapshot->uniqueid));
+ stasis_app_bridge_destroy(old_snapshot->uniqueid);
} else if (!old_snapshot) {
msg = stasis_json_event_bridge_created_create(old_snapshot);
}
More information about the asterisk-commits
mailing list