[Asterisk-Dev] fxotune.c broken by design?

Rob Thomas rob at wpm4l.com
Sun Sep 18 00:32:06 MST 2005


I've checked it out of CVS a couple of times, and I always keep getting
strange and oddly #ifdef'ed code..

A couple of subroutines are #if 0'ed out (fill_outputdata and echo_tune)
-- and most of the actual ouput is if 0'ed out:

#if 0
                                snprintf(output, sizeof(output),
"%d=%d,%d,%d,%d,%d,%d,%d,%d,%d\n", i+1,
                                                echo_trys[i].acim,
echo_trys[i].coef1, echo_trys[i].coef2,
                                                echo_trys[i].coef3,
echo_trys[i].coef4, echo_trys[i].coef5,
                                                echo_trys[i].coef6,
echo_trys[i].coef7, echo_trys[i].coef8 );
#endif

                                snprintf(output, sizeof(output),
"%d=%d,%d,%d,%d,%d,%d,%d,%d,%d\n", i+1, res,
                                                0, 0, 0, 0, 0, 0, 0, 0);

This ends up with, predictably, a result of:

3=3,0,0,0,0,0,0,0,0
4=4,0,0,0,0,0,0,0,0

The 'echo_trys' doesn't seem to exist, but is referenced in echo_tune
(which is #if 0'ed out).

It also crashes when 'debug = 1' isn't turned on (in the code), due to
trying to fprintf to outfile when it hasn't been opened (line 422).

Is this a job for Mantis, or has the wrong version been committed
somewhere along the line, and no-one's noticed?

--Rob




More information about the asterisk-dev mailing list