[Home]

Summary:ASTERISK-08966: compilation breaks with DBUSYDETECT_MARTIN and DBUSYDETECT_TONEONLY enabled
Reporter:serginuez (serginuez)Labels:
Date Opened:2007-03-08 05:50:58.000-0600Date Closed:2007-06-30 09:20:07
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:As in bug id 7414, when DBUSYDETECT_MARTIN and DBUSYDETECT_TONEONLY are enabled and I try to compile I get this error:

dsp.c: In function `ast_dsp_busydetect':
dsp.c:1296: error: `avgsilence' undeclared (first use in this function)
dsp.c:1296: error: (Each undeclared identifier is reported only once
dsp.c:1296: error: for each function it appears in.)
make: *** [dsp.o] Error 1

This happens at least with versions 1.2.14, 1.2.15 and 1.2.16.

The problem is with:

       if (res)
               ast_log(LOG_DEBUG, "ast_dsp_busydetect detected busy, avgtone: %d, avgsilence %d\n", avgtone, avgsilence);

being out of a ifndef:

#ifndef BUSYDETECT_TONEONLY
       int avgsilence = 0, hitsilence = 0;
#endif
Comments:By: Joshua C. Colp (jcolp) 2007-03-08 10:09:21.000-0600

Fixed in 1.2 as of revision 58388, 1.4 as of revision 58389, and trunk as of revision 58390. Thanks!