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

Luigi Rizzo rizzo at icir.org
Thu Feb 2 07:15:52 MST 2006


On Thu, Feb 02, 2006 at 08:02:15AM -0600, Kevin P. Fleming wrote:
> Luigi Rizzo wrote:
> > any objections to move struct ast_format into a common
> > header file, so it can be used as an argument by the various
> > ast_format_register calls ?
> 
> Seems reasonable to me.

btw i should never start looking at things, but now i am deep
in the middle of a huge simplification of this code, because:

- 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);

- a large part of the open and rewrite code is replicated in
  all the format handlers;

- there are already the file.c simplification that i submitted a
  few days ago, i could as well finish the job.

expect something for later tonight...
  
	cheers
	luigi



More information about the asterisk-dev mailing list