[zaptel-commits] sruffell: branch sruffell/voicebus r3949 - /team/sruffell/voicebus/kernel/

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Wed Mar 5 18:29:49 CST 2008


Author: sruffell
Date: Wed Mar  5 18:29:49 2008
New Revision: 3949

URL: http://svn.digium.com/view/zaptel?view=rev&rev=3949
Log:
Added a check in zt_dtmf_tone to make sure a tone zone is associated with the
channel before accessing.

Modified:
    team/sruffell/voicebus/kernel/zaptel-base.c

Modified: team/sruffell/voicebus/kernel/zaptel-base.c
URL: http://svn.digium.com/view/zaptel/team/sruffell/voicebus/kernel/zaptel-base.c?view=diff&rev=3949&r1=3948&r2=3949
==============================================================================
--- team/sruffell/voicebus/kernel/zaptel-base.c (original)
+++ team/sruffell/voicebus/kernel/zaptel-base.c Wed Mar  5 18:29:49 2008
@@ -2788,6 +2788,16 @@
 struct zt_tone *zt_dtmf_tone(const struct zt_chan *chan, char digit)
 {
 	struct zt_tone *z;
+
+	if (!chan->curzone) {
+		static int __warnonce = 1;
+		if (__warnonce) {
+			__warnonce = 0;
+			/* The tonezones are loaded by ztcfg based on /etc/zaptel.conf. */
+			printk(KERN_WARNING "zaptel: Cannot get dtmf tone until tone zone is loaded.\n");
+		}
+		return NULL;
+	}
 
 	switch (chan->digitmode) {
 	case DIGIT_MODE_DTMF:




More information about the zaptel-commits mailing list