• News
  • Idefisk
  • Tools
  • Tutorials
  • Forum
  • Reviews
  • VoIP Providers
  • Archives
  • Gallery
ZOIPER SIP softphone
AsteriskGuru Archives
Mailing List Archives
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[svn-commits] murf: trunk r40200 - /trunk/apps/app_macro.c

 
   AsteriskGuru Archives Forum Index -> Asterisk-CVS
View previous topic :: View next topic  
Author Message
svn-commits at lists.digi
Guest





PostPosted: Thu Aug 17, 2006 3:48 pm    Post subject: [svn-commits] murf: trunk r40200 - /trunk/apps/app_macro.c

Author: murf
Date: Thu Aug 17 10:48:49 2006
New Revision: 40200

URL: http://svn.digium.com/view/asterisk?rev=40200&view=rev
Log:
In app_macro, changed the previously changed upper recursion depth limit to a variable, default of the original val of 7. MACRO_RECURSION is a channel variable that will override the limit, but until I can understand and fix why this limit is neccessary, I am not advertising this variable in the docs.

Modified:
trunk/apps/app_macro.c

Modified: trunk/apps/app_macro.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_macro.c?rev=40200&r1=40199&r2=40200&view=diff
==============================================================================
--- trunk/apps/app_macro.c (original)
+++ trunk/apps/app_macro.c Thu Aug 17 10:48:49 2006
@@ -112,7 +112,7 @@
int oldpriority;
char pc[80], depthc[12];
char oldcontext[AST_MAX_CONTEXT] = "";
- int offset, depth = 0;
+ int offset, depth = 0, maxdepth = 7;
int setmacrocontext=0;
int autoloopflag, dead = 0;

@@ -129,11 +129,16 @@

LOCAL_USER_ADD(u);

+ /* does the user want a deeper rabbit hole? */
+ s = pbx_builtin_getvar_helper(chan, "MACRO_RECURSION");
+ if (s)
+ sscanf(s, "%d", &maxdepth);
+
/* Count how many levels deep the rabbit hole goes */
s = pbx_builtin_getvar_helper(chan, "MACRO_DEPTH");
if (s)
sscanf(s, "%d", &depth);
- if (depth >= 20) {
+ if (depth >= maxdepth) {
ast_log(LOG_ERROR, "Macro(): possible infinite loop detected. Returning early.\n");
LOCAL_USER_REMOVE(u);
return 0;

_______________________________________________
--Bandwidth and Colocation provided by Easynews.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/svn-commits
Back to top
Display posts from previous:   
   AsteriskGuru Archives Forum Index -> Asterisk-CVS All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
contact us at: support@asteriskguru.com - asterisKGuru.com © all rights reserved   |   *asterisk is registered trademark of © Digium™