[Asterisk-Dev] Wanted: ast_category_merge

Kevin P. Fleming kpfleming at starnetworks.us
Fri Feb 18 17:19:30 MST 2005


Matthew Boehm wrote:
> Perhaps I wasn't clear. I need to do this in the code.
> 
> struct ast_category *catA, *catB, *catC;
> catC = ast_category_merge(catA, catB);
> 
> I found inherit_category inside config.c but it wasn't listed in config.h.
> Actually, I found several functions that are in config.c and not in config.h
> It was also defined as static, I didn't understand that.

These are very basic development questions: functions defined as static 
are not intended to be used outside of that module, and that's why they 
are not included in the header file.

You were definitely not clear that you wanted to do this in code; your 
original message showed a text config example.

For this purpose, you need to use ast_category_get to get the existing 
category with the name, then use ast_variable_append to append more 
variables to that existing category. There is no need for a merge 
function, unless you actually need all three categories to continue to 
exist.



More information about the asterisk-dev mailing list