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
{
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;
}
{
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;
}