aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-09 17:21:14 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2008-01-09 17:21:14 +0000
commit5df50b6d080fda7faf4c4279b619b947ad7b9147 (patch)
tree1176734658ccd555e1f3c7f699c322bb2eeace9d
parent2db70229f898dd99801e0356fdd1ec8746cebd67 (diff)
report the same message whether Zaptel does not have transcoder support loaded or no transcoders were found
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97491 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--codecs/codec_zap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c
index 34de33fce..f04f11021 100644
--- a/codecs/codec_zap.c
+++ b/codecs/codec_zap.c
@@ -445,17 +445,19 @@ static int find_transcoders(void)
int fd, res;
unsigned int x, y;
- info.op = ZT_TCOP_GETINFO;
if ((fd = open("/dev/zap/transcode", O_RDWR)) < 0) {
- ast_log(LOG_DEBUG, "No Zaptel transcoder support!\n");
+ ast_verbose(VERBOSE_PREFIX_2 "No hardware transcoders found.\n");
return 0;
}
+
+ info.op = ZT_TCOP_GETINFO;
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))