ensure channelcount is cleared before we enumerate transcoders, so 'reload' doesn't double the channel count

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2@53658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Kevin P. Fleming
2007-02-08 22:17:49 +00:00
parent f49ce518ba
commit 27a1f39f78

View 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);