]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
ensure channelcount is cleared before we enumerate transcoders, so 'reload' doesn...
authorKevin P. Fleming <kpfleming@digium.com>
Thu, 8 Feb 2007 22:17:49 +0000 (22:17 +0000)
committerKevin P. Fleming <kpfleming@digium.com>
Thu, 8 Feb 2007 22:17:49 +0000 (22:17 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53658 65c4cc65-6c06-0410-ace0-fbb531ad65f3

codecs/codec_zap.c

index fa20fde89c89c93ac8c1d4d580703df51e71fecd..a4d9de6d8892c1824e525f97f53a4d46d78b97ba 100644 (file)
@@ -856,6 +856,11 @@ static int find_transcoders(void)
                ast_log(LOG_NOTICE, "No Zaptel transcoder support!\n");
                return 0;
        }
+
+       ast_mutex_lock(&channelcount);
+       totalchannels = 0;
+       ast_mutex_unlock(&channelcount);
+
        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);