[asterisk-commits] kpfleming: branch 1.2 r53658 - /branches/1.2/codecs/codec_zap.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Thu Feb 8 15:17:50 MST 2007


Author: kpfleming
Date: Thu Feb  8 16:17:49 2007
New Revision: 53658

URL: http://svn.digium.com/view/asterisk?view=rev&rev=53658
Log:
ensure channelcount is cleared before we enumerate transcoders, so 'reload' doesn't double the channel count

Modified:
    branches/1.2/codecs/codec_zap.c

Modified: branches/1.2/codecs/codec_zap.c
URL: http://svn.digium.com/view/asterisk/branches/1.2/codecs/codec_zap.c?view=diff&rev=53658&r1=53657&r2=53658
==============================================================================
--- branches/1.2/codecs/codec_zap.c (original)
+++ branches/1.2/codecs/codec_zap.c Thu Feb  8 16:17:49 2007
@@ -856,6 +856,11 @@
 		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);



More information about the asterisk-commits mailing list