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/branches/1.4@109575 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.4
Mark Michelson 17 years ago
parent c7e067ecde
commit 87e9daf7d7

@ -625,7 +625,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;
}
@ -634,7 +636,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