diff options
author | Mark Spencer <markster@digium.com> | 2003-08-07 05:35:45 +0000 |
---|---|---|
committer | Mark Spencer <markster@digium.com> | 2003-08-07 05:35:45 +0000 |
commit | 9f51b3590d237674347545c11ed61686703ea1e9 (patch) | |
tree | 8a2569d40e5aaf1cc5c8aa014e70dd28f7bbedce /apps/app_macro.c | |
parent | 01fcb9779aa48bdf31c222dd58e1cbe5c6077dfd (diff) |
Make parking resume properly when in macro
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@1270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_macro.c')
-rwxr-xr-x | apps/app_macro.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/app_macro.c b/apps/app_macro.c index 3e102454b..331e55072 100755 --- a/apps/app_macro.c +++ b/apps/app_macro.c @@ -98,6 +98,8 @@ static int macro_exec(struct ast_channel *chan, void *data) strncpy(oldcontext, chan->context, sizeof(oldcontext) - 1); if (!strlen(chan->macrocontext)) { strncpy(chan->macrocontext, chan->context, sizeof(chan->macrocontext) - 1); + strncpy(chan->macroexten, chan->exten, sizeof(chan->macroexten) - 1); + chan->macropriority = chan->priority; setmacrocontext=1; } argc = 1; @@ -190,8 +192,11 @@ out: if (save_macro_context) free(save_macro_context); pbx_builtin_setvar_helper(chan, "MACRO_PRIORITY", save_macro_priority); if (save_macro_priority) free(save_macro_priority); - if (setmacrocontext) + if (setmacrocontext) { strcpy(chan->macrocontext, ""); + strcpy(chan->macroexten, ""); + chan->macropriority = 0; + } if (!strcasecmp(chan->context, fullmacro)) { /* If we're leaving the macro normally, restore original information */ |