From: Anthony Minessale Date: Mon, 2 Nov 2009 18:58:55 +0000 (+0000) Subject: clear tone_count on subsequent calls X-Git-Tag: v1.0.6~38^2~73 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c5966d058b74cb8665fea008a0648aba072cc5a9;p=thirdparty%2Ffreeswitch.git clear tone_count on subsequent calls git-svn-id: http://svn.openzap.org/svn/openzap/trunk@848 a93c3328-9c30-0410-af19-c9cd2b2d52af --- diff --git a/libs/openzap/src/zap_io.c b/libs/openzap/src/zap_io.c index e73f8bdd45..f81e06bd10 100644 --- a/libs/openzap/src/zap_io.c +++ b/libs/openzap/src/zap_io.c @@ -1752,7 +1752,13 @@ ZIO_CODEC_FUNCTION(zio_alaw2ulaw) OZ_DECLARE(void) zap_channel_clear_detected_tones(zap_channel_t *zchan) { + uint32_t i; + memset(zchan->detected_tones, 0, sizeof(zchan->detected_tones[0]) * ZAP_TONEMAP_INVALID); + + for (i = 1; i < ZAP_TONEMAP_INVALID; i++) { + zchan->span->tone_finder[i].tone_count = 0; + } } OZ_DECLARE(void) zap_channel_clear_needed_tones(zap_channel_t *zchan)