[asterisk-commits] kpfleming: trunk r97495 - in /trunk: ./ codecs/codec_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Jan 9 11:30:15 CST 2008


Author: kpfleming
Date: Wed Jan  9 11:30:13 2008
New Revision: 97495

URL: http://svn.digium.com/view/asterisk?view=rev&rev=97495
Log:
Merged revisions 97491 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r97491 | kpfleming | 2008-01-09 11:21:14 -0600 (Wed, 09 Jan 2008) | 2 lines

report the same message whether Zaptel does not have transcoder support loaded or no transcoders were found

........

Modified:
    trunk/   (props changed)
    trunk/codecs/codec_zap.c

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

Modified: trunk/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/codecs/codec_zap.c?view=diff&rev=97495&r1=97494&r2=97495
==============================================================================
--- trunk/codecs/codec_zap.c (original)
+++ trunk/codecs/codec_zap.c Wed Jan  9 11:30:13 2008
@@ -421,16 +421,18 @@
 	int fd, res;
 	unsigned int x, y;
 
+	if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0) {
+		ast_verbose(VERBOSE_PREFIX_2 "No hardware transcoders found.\n");
+		return 0;
+	}
+
 	info.op = ZT_TCOP_GETINFO;
-	if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0) {
-		ast_debug(1, "No Zaptel transcoder support!\n");
-		return 0;
-	}
 	for (info.tcnum = 0; !(res = ioctl(fd, ZT_TRANSCODE_OP, &info)); info.tcnum++) {
 		ast_verb(2, "Found transcoder '%s'.\n", info.name);
 		build_translators(&map, info.dstfmts, info.srcfmts);
 		ast_atomic_fetchadd_int(&channels.total, info.numchannels / 2);
 	}
+
 	close(fd);
 
 	if (!info.tcnum)




More information about the asterisk-commits mailing list