@ -133,7 +133,7 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
s = pbx_builtin_getvar_helper ( chan , " MACRO_DEPTH " ) ;
s = pbx_builtin_getvar_helper ( chan , " MACRO_DEPTH " ) ;
if ( s )
if ( s )
sscanf ( s , " %d " , & depth ) ;
sscanf ( s , " %d " , & depth ) ;
if ( depth > = 7 ) {
if ( depth > = 20 ) {
ast_log ( LOG_ERROR , " Macro(): possible infinite loop detected. Returning early. \n " ) ;
ast_log ( LOG_ERROR , " Macro(): possible infinite loop detected. Returning early. \n " ) ;
LOCAL_USER_REMOVE ( u ) ;
LOCAL_USER_REMOVE ( u ) ;
return 0 ;
return 0 ;
@ -254,9 +254,9 @@ static int _macro_exec(struct ast_channel *chan, void *data, int exclusive)
break ;
break ;
}
}
/* don't stop executing extensions when we're in "h" */
/* don't stop executing extensions when we're in "h" */
if ( chan - > _softhangup & & strcasecmp ( old exten, " h " ) ) {
if ( chan - > _softhangup & & strcasecmp ( chan- > macr oexten, " h " ) ) {
ast_log ( LOG_DEBUG , " Extension %s, priority %d returned normally even though call was hung up\n " ,
ast_log ( LOG_DEBUG , " Extension %s, macroexten %s, priority %d returned normally even though call was hung up\n " ,
chan - > exten , chan - > priority) ;
chan - > exten , chan - > macroexten, chan - > priority) ;
goto out ;
goto out ;
}
}
chan - > priority + + ;
chan - > priority + + ;