[asterisk-commits] mmichelson: branch 1.4 r109575 - /branches/1.4/channels/chan_agent.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 18 12:58:11 CDT 2008


Author: mmichelson
Date: Tue Mar 18 12:58:11 2008
New Revision: 109575

URL: http://svn.digium.com/view/asterisk?view=rev&rev=109575
Log:
Make sure an agent doesn't try to send dtmf to a NULL channel

closes issue #12242
Reported by Yourname


Modified:
    branches/1.4/channels/chan_agent.c

Modified: branches/1.4/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/channels/chan_agent.c?view=diff&rev=109575&r1=109574&r2=109575
==============================================================================
--- branches/1.4/channels/chan_agent.c (original)
+++ branches/1.4/channels/chan_agent.c Tue Mar 18 12:58:11 2008
@@ -625,7 +625,9 @@
 {
 	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 @@
 {
 	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;
 }




More information about the asterisk-commits mailing list