From: Kevin P. Fleming Date: Thu, 8 Feb 2007 22:17:49 +0000 (+0000) Subject: ensure channelcount is cleared before we enumerate transcoders, so 'reload' doesn... X-Git-Tag: 1.2.15~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27a1f39f78ea9631805a47249b1d8ff795a1ef5c;p=thirdparty%2Fasterisk.git 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 --- 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);