mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-12 15:45:18 +00:00
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
This commit is contained in:
@@ -421,6 +421,22 @@ int ast_bridge_channel_queue_control_data(struct ast_bridge_channel *bridge_chan
|
||||
return ast_bridge_channel_queue_frame(bridge_channel, &frame);
|
||||
}
|
||||
|
||||
int ast_bridge_queue_everyone_else(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
|
||||
{
|
||||
struct ast_bridge_channel *cur;
|
||||
int not_written = -1;
|
||||
|
||||
AST_LIST_TRAVERSE(&bridge->channels, cur, entry) {
|
||||
if (cur == bridge_channel) {
|
||||
continue;
|
||||
}
|
||||
if (!ast_bridge_channel_queue_frame(cur, frame)) {
|
||||
not_written = 0;
|
||||
}
|
||||
}
|
||||
return not_written;
|
||||
}
|
||||
|
||||
void ast_bridge_channel_restore_formats(struct ast_bridge_channel *bridge_channel)
|
||||
{
|
||||
/* Restore original formats of the channel as they came in */
|
||||
|
Reference in New Issue
Block a user