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

Matt Fredrickson creslin at digium.com
Mon Sep 19 12:02:06 MST 2005


On Sun, Sep 18, 2005 at 05:32:06PM +1000, Rob Thomas wrote:
> I've checked it out of CVS a couple of times, and I always keep getting
> strange and oddly #ifdef'ed code..

Welcome to fxotune... a work in progress(TM) :-)

> 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

Yeah, that's right.  One of these days I'll write the part that tunes the
remaining values, but I still haven't done it yet.

> 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?

No, I just haven't ever run it with debug disabled :-)

It should be fixed in head when you get this (the debug crash part)

-- 
Matthew Fredrickson



More information about the asterisk-dev mailing list