[asterisk-commits] kpfleming: branch 1.4 r97491 - /branches/1.4/codecs/codec_zap.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Wed Jan 9 11:21:14 CST 2008
Author: kpfleming
Date: Wed Jan 9 11:21:14 2008
New Revision: 97491
URL: http://svn.digium.com/view/asterisk?view=rev&rev=97491
Log:
report the same message whether Zaptel does not have transcoder support loaded or no transcoders were found
Modified:
branches/1.4/codecs/codec_zap.c
Modified: branches/1.4/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/codecs/codec_zap.c?view=diff&rev=97491&r1=97490&r2=97491
==============================================================================
--- branches/1.4/codecs/codec_zap.c (original)
+++ branches/1.4/codecs/codec_zap.c Wed Jan 9 11:21:14 2008
@@ -445,17 +445,19 @@
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_log(LOG_DEBUG, "No Zaptel transcoder support!\n");
- return 0;
- }
for (info.tcnum = 0; !(res = ioctl(fd, ZT_TRANSCODE_OP, &info)); info.tcnum++) {
if (option_verbose > 1)
ast_verbose(VERBOSE_PREFIX_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 && (option_verbose > 1))
More information about the asterisk-commits
mailing list