Tony Mountifield wrote:
> Another way to fix this would be to put them into a struct:
>
> struct {
> unsigned char waste[AST_FRIENDLY_OFFSET];
> unsigned char buf[MAXSAMPLES];
> } t;
Yes, we considered that when fixing chan_iax2.
> Then waste becomes t.waste and buf becomes t.buf. The rest of the code
> then stays unchanged, in particular not having to add or subtract
> AST_FRIENDLY_OFFSET in various places.
In this application (app_sms) since the code is so small, it didn't make
much of a difference :-) It would also be possible to alloca() 'buf' and
then add AST_FRIENDLY_OFFSET to it permanently, since app_sms never
needs to look into the 'offset' area at all.
_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --
asterisk-dev mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-dev