[zaptel-commits] kpfleming: branch mogorman/zaptel-1.2-transcoder r2048 - /team/mogorman/zapte...

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Wed Jan 31 08:58:38 MST 2007


Author: kpfleming
Date: Wed Jan 31 09:58:37 2007
New Revision: 2048

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2048
Log:
prepare for firmware with different supported format lists

Modified:
    team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c

Modified: team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c?view=diff&rev=2048&r1=2047&r2=2048
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c (original)
+++ team/mogorman/zaptel-1.2-transcoder/wctc4xxp/base.c Wed Jan 31 09:58:37 2007
@@ -308,7 +308,7 @@
 };
 
 static int debug = 0;
-static char *mode[2] = { "g729", "g723.1" };
+static char *mode[2] = { "g729", "g723" };
 static int mode_count = 2;
 u32 debug_packets = 0;
 u32 debug_cmd_packets = 0;
@@ -1429,11 +1429,19 @@
 	for (x = 0; x < mode_count; x++) {
 		if (!strcmp(mode[x], "g729") ||
 		    !strcmp(mode[x], "G729")) {
+			if (!g729_numchannels) {
+				module_printk("Format '%s' not supported by the firmware for this module; ignored.\n", mode[x]);
+				continue;
+			}
 			strcat(wc->complexname, "G.729A / ");
 			complexfmts |= ZT_FORMAT_G729A;
 			wc->numchannels = min(wc->numchannels, g729_numchannels);
-		} else if (!strcmp(mode[x], "g723.1") ||
-			   !strcmp(mode[x], "G723.1")) {
+		} else if (!strcmp(mode[x], "g723") ||
+			   !strcmp(mode[x], "G723")) {
+			if (!g723_numchannels) {
+				module_printk("Format '%s' not supported by the firmware for this module; ignored.\n", mode[x]);
+				continue;
+			}
 			strcat(wc->complexname, "G.723.1 5.3Kbps / ");
 			complexfmts |= ZT_FORMAT_G723_1;
 			wc->numchannels = min(wc->numchannels, g723_numchannels);



More information about the zaptel-commits mailing list