mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-17 23:38:23 +00:00
prevent seg fault with attempt_transfer (bug #2741)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/v1-0@4146 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -302,6 +302,12 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
|
||||
int allowdisconnect_in,allowdisconnect_out,allowredirect_in,allowredirect_out;
|
||||
char *monitor_exec;
|
||||
|
||||
if (chan && peer) {
|
||||
pbx_builtin_setvar_helper(chan, "BRIDGEPEER", peer->name);
|
||||
pbx_builtin_setvar_helper(peer, "BRIDGEPEER", chan->name);
|
||||
} else if (chan)
|
||||
pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", NULL);
|
||||
|
||||
if (monitor_ok) {
|
||||
if (!monitor_app) {
|
||||
if (!(monitor_app = pbx_findapp("Monitor")))
|
||||
@@ -480,6 +486,8 @@ int ast_bridge_call(struct ast_channel *chan,struct ast_channel *peer,struct ast
|
||||
}
|
||||
/* XXX Maybe we should have another message here instead of invalid extension XXX */
|
||||
} else if (ast_exists_extension(transferee, transferer_real_context, newext, 1, transferer->callerid)) {
|
||||
pbx_builtin_setvar_helper(peer, "BLINDTRANSFER", chan->name);
|
||||
pbx_builtin_setvar_helper(chan, "BLINDTRANSFER", peer->name);
|
||||
ast_moh_stop(transferee);
|
||||
res=ast_autoservice_stop(transferee);
|
||||
if (!transferee->pbx) {
|
||||
|
||||
Reference in New Issue
Block a user