[asterisk-commits] mmichelson: trunk r109576 - in /trunk: ./ channels/chan_agent.c

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


Author: mmichelson
Date: Tue Mar 18 12:59:18 2008
New Revision: 109576

URL: http://svn.digium.com/view/asterisk?view=rev&rev=109576
Log:
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


........

Modified:
    trunk/   (props changed)
    trunk/channels/chan_agent.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/channels/chan_agent.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_agent.c?view=diff&rev=109576&r1=109575&r2=109576
==============================================================================
--- trunk/channels/chan_agent.c (original)
+++ trunk/channels/chan_agent.c Tue Mar 18 12:59:18 2008
@@ -595,7 +595,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;
 }
@@ -604,7 +606,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