[zaptel-commits] kpfleming: branch mogorman/zaptel-1.2-transcoder r2014 - in /team/mogorman/za...

zaptel-commits at lists.digium.com zaptel-commits at lists.digium.com
Mon Jan 29 15:48:36 MST 2007


Author: kpfleming
Date: Mon Jan 29 16:48:36 2007
New Revision: 2014

URL: http://svn.digium.com/view/zaptel?view=rev&rev=2014
Log:
add codec_test to 'make tests'
clean up some compiler warnings in codec_test

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

Modified: team/mogorman/zaptel-1.2-transcoder/Makefile
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/Makefile?view=diff&rev=2014&r1=2013&r2=2014
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/Makefile (original)
+++ team/mogorman/zaptel-1.2-transcoder/Makefile Mon Jan 29 16:48:36 2007
@@ -157,6 +157,7 @@
 devel: tor2ee 
 
 tests: patgen pattest patlooptest hdlcstress hdlctest hdlcgen hdlcverify timertest
+	$(MAKE) -C wctc4xxp tests CFLAGS="$(CFLAGS) -I.."
 
 tor2.o: tor2-hw.h tor2fw.h
 

Modified: team/mogorman/zaptel-1.2-transcoder/wctc4xxp/Makefile
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wctc4xxp/Makefile?view=diff&rev=2014&r1=2013&r2=2014
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wctc4xxp/Makefile (original)
+++ team/mogorman/zaptel-1.2-transcoder/wctc4xxp/Makefile Mon Jan 29 16:48:36 2007
@@ -3,3 +3,5 @@
 include $(obj)/Kbuild
 
 endif
+
+tests: codec_test

Modified: team/mogorman/zaptel-1.2-transcoder/wctc4xxp/codec_test.c
URL: http://svn.digium.com/view/zaptel/team/mogorman/zaptel-1.2-transcoder/wctc4xxp/codec_test.c?view=diff&rev=2014&r1=2013&r2=2014
==============================================================================
--- team/mogorman/zaptel-1.2-transcoder/wctc4xxp/codec_test.c (original)
+++ team/mogorman/zaptel-1.2-transcoder/wctc4xxp/codec_test.c Mon Jan 29 16:48:36 2007
@@ -99,9 +99,7 @@
 static int find_transcoders(struct tctest_info *tctest_info)
 {
 	struct zt_transcode_info info = { 0, };
-	struct format_map map = { { { 0 } } };
 	int fd, res;
-	unsigned int x, y;
 
 	if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0) {
 	        printf("Warning: No Zaptel transcoder support!\n");
@@ -193,7 +191,6 @@
 {
 	struct zt_transcode_header *hdr = ztp->hdr;
 	unsigned int x;
-	int i;
 
 	hdr->srcoffset = 0;
 
@@ -235,10 +232,7 @@
 	unsigned char packet_out[200];
 	struct tctest_info tctest_info;
 
-	tctest_info.errors = 0;
-	tctest_info.overcnt_error = 0;
-	tctest_info.undercnt_error = 0;
-	tctest_info.numcards_werrors = 0;
+	memset(&tctest_info, 0, sizeof(tctest_info));
 
 	if ((argc < 2) || (argc > 3))
 	{
@@ -287,7 +281,7 @@
  
  				open_transcoder(&ztp[i], AST_FORMAT_G729A, AST_FORMAT_ULAW);
 
-				if (tctest_info.timeout_error[card_testing] = encode_packet(&ztp[i], ulaw_slin_ex, packet_out) == -1)
+				if ((tctest_info.timeout_error[card_testing] = encode_packet(&ztp[i], ulaw_slin_ex, packet_out) == -1))
 					tctest_info.errors++;
 
 				if (memcmp(g729a_expected, packet_out, 20) != 0)



More information about the zaptel-commits mailing list