Merged revisions 109575 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r109575 | mmichelson | 2008-03-18 12:58:11 -0500 (Tue, 18 Mar 2008) | 6 lines

Make sure an agent doesn't try to send dtmf to a NULL channel

closes issue #12242
Reported by Yourname


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@109576 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.1
Mark Michelson 17 years ago
parent 4232cef812
commit f1181cb04e

@ -595,7 +595,9 @@ static int agent_digit_begin(struct ast_channel *ast, char digit)
{
struct agent_pvt *p = ast->tech_pvt;
ast_mutex_lock(&p->lock);
ast_senddigit_begin(p->chan, digit);
if (p->chan) {
ast_senddigit_begin(p->chan, digit);
}
ast_mutex_unlock(&p->lock);
return 0;
}
@ -604,7 +606,9 @@ static int agent_digit_end(struct ast_channel *ast, char digit, unsigned int dur
{
struct agent_pvt *p = ast->tech_pvt;
ast_mutex_lock(&p->lock);
ast_senddigit_end(p->chan, digit, duration);
if (p->chan) {
ast_senddigit_end(p->chan, digit, duration);
}
ast_mutex_unlock(&p->lock);
return 0;
}

Loading…
Cancel
Save