[asterisk-dev] RFC: move struct ast_format to include/asterisk/file.h ?

Luigi Rizzo rizzo at icir.org
Thu Feb 2 08:31:45 MST 2006


On Thu, Feb 02, 2006 at 09:02:59AM -0600, Kevin P. Fleming wrote:
> Luigi Rizzo wrote:
> 
> > - all formats redefine their own ast_filestream, but there is a
> >   dangerous overlay of structures, and duplicated or unused fields
> >   (e.g. there is no check in the code to make sure that
> >   AST_RESERVED_POINTERS is large enough to accommodate the
> >   struct ast_filestream in file.c; some ast_filestream have a leftover
> >   but unused 'owner' field; all ast_filestream have
> >   a FILE *f field which should be moved to the main descriptor);
> 
> Yes, this has been around since before I got involved, and it does seem 
> dangerous to me as well :-)

related - what's the purpose of AST_FRIENDLY_OFFSET that is
used in various places ?
i understand that it is some extra leading space that
one tries to leave empty to possibly accommodate headers etc,
but what is the invariant that we can use to be sure that
we do not move before the beginning ?

cheers
luigi




More information about the asterisk-dev mailing list