diff options
author | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-07 05:35:45 +0000 |
---|---|---|
committer | markster <markster@f38db490-d61c-443f-a65b-d21fe96a405b> | 2003-08-07 05:35:45 +0000 |
commit | 169b53505ac9b89e1212b48e06a89570593003dc (patch) | |
tree | 8a2569d40e5aaf1cc5c8aa014e70dd28f7bbedce /apps/app_macro.c | |
parent | 80c651f140ec58fbff5cfca8c966117c3704bd91 (diff) |
Make parking resume properly when in macro
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@1270 f38db490-d61c-443f-a65b-d21fe96a405b
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 */ |