]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
clear tone_count on subsequent calls
authorAnthony Minessale <anthony.minessale@gmail.com>
Mon, 2 Nov 2009 18:58:55 +0000 (18:58 +0000)
committerAnthony Minessale <anthony.minessale@gmail.com>
Mon, 2 Nov 2009 18:58:55 +0000 (18:58 +0000)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@848 a93c3328-9c30-0410-af19-c9cd2b2d52af

libs/freetdm/src/zap_io.c

index e73f8bdd45d63ca08839caee0af9ed218c5605c6..f81e06bd1036f1e7c3c4dd4d245fc48e35a6e61b 100644 (file)
@@ -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)