From 1267c91315f6850483022b4535beadbc0069b22e Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 21 Jun 2013 22:39:27 +0000 Subject: Extract a useful routine from the softmix bridge technology. * Extract a useful routine from the softmix bridge technology for other technologies. Make other technologies use it if they can. * Made native and 1-1 bridges write to all parties if the bridge channel writing the frame into the bridge is NULL. Softmix will also do the same for frame types that make sense. * Tweak the bridge write routine return value meaning and adjust the bridge technologies to match. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392514 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- bridges/bridge_simple.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'bridges/bridge_simple.c') diff --git a/bridges/bridge_simple.c b/bridges/bridge_simple.c index 3e53b31c0..49e3a35ac 100644 --- a/bridges/bridge_simple.c +++ b/bridges/bridge_simple.c @@ -68,18 +68,7 @@ static int simple_bridge_join(struct ast_bridge *bridge, struct ast_bridge_chann static int simple_bridge_write(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame) { - struct ast_bridge_channel *other; - - /* Find the channel we actually want to write to */ - other = ast_bridge_channel_peer(bridge_channel); - if (!other) { - return -1; - } - - /* The bridging core takes care of freeing the passed in frame. */ - ast_bridge_channel_queue_frame(other, frame); - - return 0; + return ast_bridge_queue_everyone_else(bridge, bridge_channel, frame); } static struct ast_bridge_technology simple_bridge = { -- cgit v1.2.3