Summary:ASTERISK-07220: compilation breaks with DBUSYDETECT_MARTIN and DBUSYDETECT_TONEONLY enabled
Reporter:Sergio Serrano (srsergio)Labels:
Date Opened:2006-06-22 03:57:32Date Closed:2006-07-02 22:25:10
Versions:Frequency of
Description:From releases when I set DBUSYDETECT_MARTIN and DBUSYDETECT_TONEONLY and I try to compile I obtain next error:
dsp.c: In function `ast_dsp_busydetect':
dsp.c:1284: error: `avgsilence' undeclared (first use in this function)
dsp.c:1284: error: (Each undeclared identifier is reported only once
dsp.c:1284: error: for each function it appears in.)
make: *** [dsp.o] Error 1

When I observed source code, I have seen in ast_dsp_busydetect function next lines:

int avgsilence = 0, hitsilence = 0;

And in line 1284, I see:

/* If we know the expected busy tone silent-period length, check we are in the range */
if (res && (dsp->busy_quietlength > 0)) {
if (abs(avgsilence - dsp->busy_quietlength) > (dsp->busy_quietlength*BUSY_PAT_PERCENT/100)) {

As you can see, it appears avgsilence variable without #ifndef directive.

It is a bug?
Comments:By: Serge Vecher (serge-v) 2006-06-28 12:44:42

this appears to be in the code block that was added when 4830 was merged in.

stevedavies: can you please help out with this one.

By: Russell Bryant (russell) 2006-07-02 22:25:10

fixed in 1.2 and the trunk, thanks!