aboutsummaryrefslogtreecommitdiffstats
path: root/codecs
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-08 22:17:49 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2007-02-08 22:17:49 +0000
commite8ea3f209b36fa2c5403b51af4306ff018d37b70 (patch)
tree5a446f84ab362faa542f65702972d3bd70f7208e /codecs
parent61ae4461a9118022178aeb3e4a2107ece1948580 (diff)
ensure channelcount is cleared before we enumerate transcoders, so 'reload' doesn't double the channel count
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2@53658 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'codecs')
-rw-r--r--codecs/codec_zap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c
index fa20fde89..a4d9de6d8 100644
--- a/codecs/codec_zap.c
+++ b/codecs/codec_zap.c
@@ -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);