From c5966d058b74cb8665fea008a0648aba072cc5a9 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 2 Nov 2009 18:58:55 +0000 Subject: [PATCH] clear tone_count on subsequent calls git-svn-id: http://svn.openzap.org/svn/openzap/trunk@848 a93c3328-9c30-0410-af19-c9cd2b2d52af --- libs/openzap/src/zap_io.c | 6 ++++++ 1 file changed, 6 insertions(+) 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)