From b846c71e0ae08a59768b1be169aa981be30f1600 Mon Sep 17 00:00:00 2001
From: Mark Spencer <markster@digium.com>
Date: Tue, 11 Jan 2005 18:10:30 +0000
Subject: [PATCH] Fix typo in tone detect (bug #3315)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@4759 65c4cc65-6c06-0410-ace0-fbb531ad65f3
---
 dsp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dsp.c b/dsp.c
index 60787ec29f..ff091a65ec 100755
--- a/dsp.c
+++ b/dsp.c
@@ -1196,10 +1196,10 @@ int ast_dsp_busydetect(struct ast_dsp *dsp)
 		}
 #endif
 		if (avgtone > dsp->historicnoise[x]) {
-			if (avgtone - (avgtone / BUSY_PERCENT) <= dsp->historicsilence[x])
+			if (avgtone - (avgtone / BUSY_PERCENT) <= dsp->historicnoise[x])
 				hittone++;
 		} else {
-			if (avgtone + (avgtone / BUSY_PERCENT) >= dsp->historicsilence[x])
+			if (avgtone + (avgtone / BUSY_PERCENT) >= dsp->historicnoise[x])
 				hittone++;
 		}
 	}
-- 
GitLab