Fix double parking crash (bug #1302)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2645 f38db490-d61c-443f-a65b-d21fe96a405b
This commit is contained in:
parent
b837107b6b
commit
7db49553a1
|
@ -575,11 +575,11 @@ static int park_exec(struct ast_channel *chan, void *data)
|
||||||
were the person called. */
|
were the person called. */
|
||||||
if (option_verbose > 2)
|
if (option_verbose > 2)
|
||||||
ast_verbose(VERBOSE_PREFIX_3 "Channel %s connected to parked call %d\n", chan->name, park);
|
ast_verbose(VERBOSE_PREFIX_3 "Channel %s connected to parked call %d\n", chan->name, park);
|
||||||
res = ast_bridge_call(peer, chan, 1, 1, 0);
|
res = ast_bridge_call(chan, peer, 1, 1, 0);
|
||||||
/* Simulate the PBX hanging up */
|
/* Simulate the PBX hanging up */
|
||||||
if (res != AST_PBX_KEEPALIVE)
|
if (res != AST_PBX_NO_HANGUP_PEER)
|
||||||
ast_hangup(peer);
|
ast_hangup(peer);
|
||||||
return -1;
|
return res;
|
||||||
} else {
|
} else {
|
||||||
/* XXX Play a message XXX */
|
/* XXX Play a message XXX */
|
||||||
dres = ast_streamfile(chan, "pbx-invalidpark", chan->language);
|
dres = ast_streamfile(chan, "pbx-invalidpark", chan->language);
|
||||||
|
|
Reference in New Issue