SVN commits to the Asterisk project wrote: > Added: team/mmichelson/forward-loop/include/asterisk/global_datastores.h > URL: > http://svn.digium.com/view/asterisk/team/mmichelson/forward-loop/include/asterisk/global_datastores.h?view=auto&rev=87017 > ============================================================================== > --- team/mmichelson/forward-loop/include/asterisk/global_datastores.h (added) > +++ team/mmichelson/forward-loop/include/asterisk/global_datastores.h Wed Oct > 24 17:11:33 2007 > @@ -1,0 +1,21 @@ > + > +#ifndef _ASTERISK_GLOBAL_DATASTORE_H > +#define _ASTERISK_GLOBAL_DATASTORE_H > + > +#include "asterisk/channel.h" > + > +void dialed_interface_destroy(void *data); > +void *dialed_interface_duplicate(void *data); > + > +const struct ast_datastore_info dialed_interface_info = { > + .type ="dialed-interface", > + .destroy = dialed_interface_destroy, > + .duplicate = dialed_interface_duplicate, > +}; > + > +struct ast_dialed_interface { > + char interface[80]; > + AST_LIST_ENTRY(ast_dialed_interface) list; > +}; > + > +#endif
Since all this stuff is in the global namespace, it should be prefixed with ast_ so as not to collide with anything defined locally in modules. Also, I'd suggest prefixing the two callback functions with '__ast_', signifying that they are for internal usage only and should not be called directly. Another possibility would be to move the definition of the dialed_interface_info structure into global_datastores.c, and leaving just an 'extern' declaration of it in this header file. This would allow these two functions to then be static and local to that module. -- Kevin P. Fleming Director of Software Technologies Digium, Inc. - "The Genuine Asterisk Experience" (TM) _______________________________________________ --Bandwidth and Colocation Provided by http://www.api-digital.com-- asterisk-dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
