diff options
author | Kinsey Moore <kmoore@digium.com> | 2013-08-15 12:05:41 +0000 |
---|---|---|
committer | Kinsey Moore <kmoore@digium.com> | 2013-08-15 12:05:41 +0000 |
commit | e9ac63f9a99d29f1a7c8e966dcb9d187b85900dc (patch) | |
tree | 7660f2799c50162f9b6d2a038a4ec5bfcb352a59 /res/res_stasis.c | |
parent | 62c2b804878a60fe7fc66cdaf9973472bd22065b (diff) |
Prevent automagic things from happening to Stasis application bridges
This prevents swap optimization, merges, and transfers involving Stasis
application bridges. It wouldn't be nice if the bridge you thought you
owned disappeared from under you.
Reported-by: Richard Mudgett
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_stasis.c')
-rw-r--r-- | res/res_stasis.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/res/res_stasis.c b/res/res_stasis.c index b64f40ca9..5d44d0ef9 100644 --- a/res/res_stasis.c +++ b/res/res_stasis.c @@ -442,12 +442,15 @@ static void control_unlink(struct stasis_app_control *control) struct ast_bridge *stasis_app_bridge_create(const char *type) { struct ast_bridge *bridge; - int capabilities, flags = 0; + int capabilities, flags = AST_BRIDGE_FLAG_MERGE_INHIBIT_FROM | AST_BRIDGE_FLAG_MERGE_INHIBIT_TO + | AST_BRIDGE_FLAG_SWAP_INHIBIT_FROM | AST_BRIDGE_FLAG_SWAP_INHIBIT_TO + | AST_BRIDGE_FLAG_TRANSFER_PROHIBITED; + if (ast_strlen_zero(type) || !strcmp(type, "mixing")) { capabilities = AST_BRIDGE_CAPABILITY_1TO1MIX | AST_BRIDGE_CAPABILITY_MULTIMIX | AST_BRIDGE_CAPABILITY_NATIVE; - flags = AST_BRIDGE_FLAG_SMART; + flags |= AST_BRIDGE_FLAG_SMART; } else if (!strcmp(type, "holding")) { capabilities = AST_BRIDGE_CAPABILITY_HOLDING; } else { |