mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 00:04:53 +00:00
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
This commit is contained in:
@@ -625,7 +625,9 @@ static int agent_digit_begin(struct ast_channel *ast, char digit)
|
|||||||
{
|
{
|
||||||
struct agent_pvt *p = ast->tech_pvt;
|
struct agent_pvt *p = ast->tech_pvt;
|
||||||
ast_mutex_lock(&p->lock);
|
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);
|
ast_mutex_unlock(&p->lock);
|
||||||
return 0;
|
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;
|
struct agent_pvt *p = ast->tech_pvt;
|
||||||
ast_mutex_lock(&p->lock);
|
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);
|
ast_mutex_unlock(&p->lock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user