mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Better protect bridge_channel state from other threads.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@379789 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -111,14 +111,12 @@ static int feature_blind_transfer(struct ast_bridge *bridge, struct ast_bridge_c
|
||||
/* Grab the extension to transfer to */
|
||||
if (!grab_transfer(bridge_channel->chan, exten, sizeof(exten), context)) {
|
||||
ast_stream_and_wait(bridge_channel->chan, "pbx-invalid", AST_DIGIT_ANY);
|
||||
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_WAIT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get a channel that is the destination we wish to call */
|
||||
if (!(chan = dial_transfer(bridge_channel->chan, exten, context))) {
|
||||
ast_stream_and_wait(bridge_channel->chan, "beeperr", AST_DIGIT_ANY);
|
||||
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_WAIT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -180,14 +178,12 @@ static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridg
|
||||
/* Grab the extension to transfer to */
|
||||
if (!grab_transfer(bridge_channel->chan, exten, sizeof(exten), context)) {
|
||||
ast_stream_and_wait(bridge_channel->chan, "pbx-invalid", AST_DIGIT_ANY);
|
||||
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_WAIT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Get a channel that is the destination we wish to call */
|
||||
if (!(chan = dial_transfer(bridge_channel->chan, exten, context))) {
|
||||
ast_stream_and_wait(bridge_channel->chan, "beeperr", AST_DIGIT_ANY);
|
||||
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_WAIT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -195,7 +191,6 @@ static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridg
|
||||
if (!(attended_bridge = ast_bridge_new(AST_BRIDGE_CAPABILITY_1TO1MIX, 0))) {
|
||||
ast_hangup(chan);
|
||||
ast_stream_and_wait(bridge_channel->chan, "beeperr", AST_DIGIT_ANY);
|
||||
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_WAIT);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -232,7 +227,6 @@ static int feature_attended_transfer(struct ast_bridge *bridge, struct ast_bridg
|
||||
}
|
||||
} else {
|
||||
ast_stream_and_wait(bridge_channel->chan, "beeperr", AST_DIGIT_ANY);
|
||||
ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_WAIT);
|
||||
}
|
||||
|
||||
/* Now that all channels are out of it we can destroy the bridge and the called features structure */
|
||||
|
Reference in New Issue
Block a user