aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_macro.c
AgeCommit message (Collapse)AuthorFilesLines
2009-08-10AST-2009-005tilghman1-4/+4
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@211528 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-07Fix Macro documentation to match current (and intended) behavior.tilghman1-7/+13
(See -dev mailing list) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@186775 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-11Restore a behavior that was recently changed, when we fixed issue #13962 andtilghman1-0/+17
issue #13363 (related to issue #6176). When a hangup occurs during a Macro execution in earlier 1.4, the h extension would execute within the Macro context, whereas it was always supposed to execute only within the main context (where Macro was called). So this fix checks for an "h" extension in the deepest macro context where a hangup occurred; if it exists, that "h" extension executes, otherwise the main context "h" is executed. (closes issue #14122) Reported by: wetwired Patches: 20090210__bug14122.diff.txt uploaded by Corydon76 (license 14) Tested by: andrew git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@174885 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-17Reverse the fix from issue #6176 and add proper handling for that issue.tilghman1-19/+54
(Closes issue #13962, closes issue #13363) Fixed by myself (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@165317 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-16Do not dereference the channel if AST_PBX_KEEPALIVE has been returned.russell1-1/+1
This is a bug I noticed while looking at the code for app_macro. This return code means that another thread has assumed ownership of the channel and it can no longer be touched. (I hate this return code with a passion, by the way.) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@164876 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02app_macro only needs a rdlock on the contexts list.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96020 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-30Merged revisions 77767 via svnmerge from file1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r77767 | file | 2007-07-30 11:50:02 -0300 (Mon, 30 Jul 2007) | 4 lines (closes issue #10334) Reported by: ramonpeek Pass through the return value from macro_exec through the MacroIf application. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@77768 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-31Merged revisions 66744 via svnmerge from tilghman1-5/+6
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r66744 | tilghman | 2007-05-31 10:58:45 -0500 (Thu, 31 May 2007) | 2 lines Issue 9818 - Fix for issue 8329 breaks pbx_realtime. Issue 8329 will remain unfixed for pbx_realtime, but only because we lack core API to do it. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@66770 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-08Merged revisions 63477 via svnmerge from tilghman1-18/+32
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r63477 | tilghman | 2007-05-08 17:19:15 -0500 (Tue, 08 May 2007) | 2 lines Issue 9602 - segfault in app_macro ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@63478 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-08Merged revisions 60711 via svnmerge from tilghman1-3/+108
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r60711 | tilghman | 2007-04-08 09:00:22 -0500 (Sun, 08 Apr 2007) | 2 lines Gosub called within a Macro resets the arguments improperly and causes general weirdness. (Issue 8329) ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@60713 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-23Merged revisions 59186 via svnmerge from murf1-0/+5
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r59186 | murf | 2007-03-23 09:57:26 -0600 (Fri, 23 Mar 2007) | 1 line Added a few words in the Macro doc strings about the behavior of macros with hangups (et al.), as per 9337 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@59188 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-07Merged revisions 53354 via svnmerge from tilghman1-2/+10
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53354 | tilghman | 2007-02-07 09:30:02 -0600 (Wed, 07 Feb 2007) | 2 lines Issue 7440 - Macro called from Macro from the h extension exits prematurely ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@53355 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04OOOps! There is no alternative to suggest in 1.4. A small erasure.murf1-3/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44338 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04In response to bug 7776, a Warning has been added to the doc string for Macro().murf1-1/+9
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@44337 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19Various updates from PCadach's chan_h323-live branchmattf1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43294 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19similar patch for verbose vs debug with minor changesmogorman1-2/+2
bug 2617 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-29Committed a fix for 7731, suggested by mnehauser.murf1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41268 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-28/+17
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-17In app_macro, changed the previously changed upper recursion depth limit to ↵murf1-2/+7
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. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40200 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-15This change fixes bug 7731, macros not executing more than one level deep in ↵murf1-4/+4
a hung-up situation; also increased maximum recursion depth from 7 to 20, to keep serious coders from painful toe-stubbings git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39909 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-14resolve some compiler warnings ...russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39684 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-14add MacroExclusive application, a Macro that only one call can executed atrussell1-4/+48
a time (issue #7366, Steve Davies, with mods by me as discussed in the report) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39681 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-05Merged revisions 24837 via svnmerge from russell1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r24837 | russell | 2006-05-05 10:44:50 -0400 (Fri, 05 May 2006) | 3 lines use pbx_checkcondition() instead of ast_true() to evaluate the condition for MacroIf and WhileIf (issue #7086) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24838 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-11/+6
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-2/+2
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-30use ast_strdup instead of strduprizzo1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16561 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-15remove the uses of the deprecated STANDARD_LOCAL_USERrussell1-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10241 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-05Merged revisions 9156 via svnmerge from tilghman1-14/+23
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r9156 | tilghman | 2006-02-05 11:10:19 -0600 (Sun, 05 Feb 2006) | 2 lines Bug 6176 - Fix race condition ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9157 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21on this pass, only remove duplicate log messagesrussell1-3/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8403 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21revert my pass through the tree to remove checks of the result of ast_strduparussell1-0/+5
(revisions 8378 through 8381) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8387 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21remove lots of useless checks of the result of ast_strduparussell1-5/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8379 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-13Various cleanups from comments in an email from Luigi Rizzo. Thank you!russell1-9/+4
- Use a cleaner syntax for declaring the allocation macros - Fix return value for ast_strdup/ast_strndup - remove safe_strdup from app_macro, since ast_strup does the same thing - fix a place in app_queue where ast_calloc+strncpy was used instead of ast_strdup. If you are helping out with these conversions, please watch out for other places where this is done. - add a note to the coding guidelines about the fix to app_queue git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8065 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-30update doxygen docs to specify authorsrussell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7682 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-13reduce some duplicated code when doing a strdup (issue #5986)russell1-12/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7472 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-03Bug 5858 - Make the chanvars.c functions return a 'const char *'tilghman1-12/+11
This should prevent us from unintentionally changing variable values when they're returned from pbx_builtin_getvar_helper. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7304 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-08make app_queue 1.2 jump compliant (issue #5580)russell1-2/+3
add missing includes of stdio.h remove some unused and duplicate headers git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7026 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-07application doc updatekpfleming1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6992 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-06issue #5605russell1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6979 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-26remove unnecessary checks before calls to ast_strlen_zerorussell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6864 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24Doxygen documentation update from oej (issue #5505)russell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-19Massive cleanups to applications for LOCAL_USER handling and some other things.russell1-21/+34
In general, LOCAL_USER_ADD/REMOVE should be the first/last thing called in an application. An exception is if there is some *fast* setup code that might halt the execution of the application, such as checking to see if an argument exists. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6832 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-18it's a good idea to unregister everything before calling ↵russell1-6/+15
STANDARD_HANGUP_LOCALUSERS git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6828 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)kpfleming1-5/+16
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6596 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-07put a limit on Macro depth (to combat recursion) (issue #5114)kpfleming1-2/+23
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6535 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-10define an AST_MAX_CONTEXT for use instead of AST_MAX_EXTENSIONrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6076 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-10more ast_copy_string conversionsrussell1-7/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6074 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06the last round of file version tagskpfleming1-4/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5867 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-29make 'goto' APIs aware of auto-processing loops, so they know exactly when ↵kpfleming1-0/+4
to set the requested priority or one priority lower git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5529 f38db490-d61c-443f-a65b-d21fe96a405b