[Asterisk-Dev] Misbehaviour in ast_variable_browse

Kevin P. Fleming kpfleming at starnetworks.us
Tue Feb 22 08:25:04 MST 2005


Luis Vazquez wrote:

> cat = ast_category_browse(cfg);
> while(cat) {
>   /* do our thinng */
>   cat = cat->next;
> }

It is not done this way, because "struct ast_category" is an opaque type 
outside of config.c; no users of the config API can see inside it.

"struct ast_variable", on the other hand, is not opaque, and users can 
follow the links to walk through the variable list. While it would be 
logical to change that, it would break all existing users of the API 
(including the out-of-tree ones, which is nasty) and for very little gain.



More information about the asterisk-dev mailing list