[asterisk-dev] [svn-commits] junky: trunk r115593 - /trunk/funcs/func_speex.c

Tilghman Lesher tilghman at mail.jeffandtilghman.com
Sat May 10 10:53:50 CDT 2008


On Saturday 10 May 2008 09:55:15 Russell Bryant wrote:
> >  static int load_module(void)
> >  {
> > -	if (ast_custom_function_register(&agc_function)) {
> > -		return AST_MODULE_LOAD_DECLINE;
> > -	}
> > -
> > -	if (ast_custom_function_register(&denoise_function)) {
> > -		ast_custom_function_unregister(&denoise_function);
> > -		return AST_MODULE_LOAD_DECLINE;
> > -	}
> > -
> > -	return AST_MODULE_LOAD_SUCCESS;
> > +	int res = 0;
> > +
> > +	res |= ast_custom_function_register(&agc_function);
> > +	res |= ast_custom_function_register(&denoise_function);
> > +
> > +	return res;
> >  }

JunK-Y-

Now that I see the whole code, it's obvious what the problem was.
The unregister in the second half should have unregistered
agc_function, not denoise_function.  As Russell said, revert the
change, but you can fix that at the same time.

-- 
Tilghman



More information about the asterisk-dev mailing list