]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
report the same message whether Zaptel does not have transcoder support loaded or...
authorKevin P. Fleming <kpfleming@digium.com>
Wed, 9 Jan 2008 17:21:14 +0000 (17:21 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Wed, 9 Jan 2008 17:21:14 +0000 (17:21 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@97491 65c4cc65-6c06-0410-ace0-fbb531ad65f3

codecs/codec_zap.c

index 34de33fceba6795902552947b060d4283800d894..f04f110217314e8cf7f21aa61977090a253b385d 100644 (file)
@@ -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))