From 27a1f39f78ea9631805a47249b1d8ff795a1ef5c Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Thu, 8 Feb 2007 22:17:49 +0000 Subject: [PATCH] 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 --- codecs/codec_zap.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/codecs/codec_zap.c b/codecs/codec_zap.c index fa20fde89c..a4d9de6d88 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); -- 2.47.2