[asterisk-dev] Depth of macros limited to 7 in app_macro.c

Ramon Peek R.Peek at trends.nl
Fri Mar 31 04:34:09 MST 2006


I am using quite a large superdial-macro in my system.
>From within this macro other macro's are being called and therefor the
current depth of my superdial-macro is already 6
In some cases my superdial-macro dials another extension using the LOCAL
channel and the same superdial-macro,
this causes a macro-depth over 7 and results in app_macro to report "
possible infinite loop detected.  Returning early."
 
Now I know I'm really not doing anything really out of this world, I'm
just using a large macro.
So a maximum macro-depth of 7 is quite shallow to me, is there any
special reason why this depth is set to 7?
In my situation I can think of macro depths up to 25, I can adjust the
depth but is it really save to do so?
I cannot find any reason why we couldn't change the macro-depth to 99,
in case of a real loop that number is quickly reached.
So why 7, it's so low!
 
Is there anybody else with an option about this issue?
 
CODE in app_macro.c :
 
        if (depth >= 7) {
                ast_log(LOG_ERROR, "Macro():  possible infinite loop
detected.  Returning early.\n");
                LOCAL_USER_REMOVE(u);
                return 0;

 
Ramon Peek
Trends Telematics B.V.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-dev/attachments/20060331/014e095e/attachment.htm


More information about the asterisk-dev mailing list