aboutsummaryrefslogtreecommitdiffstats
path: root/utils/ael_main.c
AgeCommit message (Collapse)AuthorFilesLines
2007-12-20modify http://svn.digium.com/view/asterisk?view=rev&rev=93603rizzo1-5/+8
so that paths and filename are writable by asterisk.c without causing segfaults. This involves defining the variables as const char *, and having them point to as static, writable buffer defined in asterisk.c On passing, fix some errors in using these variables in some files in utils/ , and in res/snmp/agent.c which was redefining a variable without using paths.h (not applicable to 1.4) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94168 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18make configuration variable const so they are not accidentallyrizzo1-5/+5
modified. This requires casting the strings in asterisk.c when writing to them, so we do it through a macro to do it consistently. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-08normalize header order, and add a comment on the needrizzo1-2/+10
to clean up this file. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91930 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26closes issue #11341; made changes to make utils again right with the ↵murf1-0/+2
MTX_PROFILE world. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89595 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21move these forward declarations back to asterisk.h where they belong... even ↵kpfleming1-19/+11
though asterisk.h includes compat.h, these declarations have nothing to do with the being platform-compatible and are directly related to being part of Asterisk git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89482 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17more removal of duplicate #include linesrizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-5/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26Merged revisions 87168 via svnmerge from murf1-0/+16
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87168 | murf | 2007-10-26 10:34:02 -0600 (Fri, 26 Oct 2007) | 1 line closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config, ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87187 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21Merged revisions 83432 via svnmerge from russell1-5/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set of changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2. (closes issue #10774, patch from qwell) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83433 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-24Merged revisions 80722 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80722 | russell | 2007-08-24 10:28:05 -0500 (Fri, 24 Aug 2007) | 3 lines Tweak the formatting of this MODULEINFO block. I think this would have caused a "*" to get in the menuselect-tree file. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80725 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-24Merged revisions 80717 via svnmerge from murf1-0/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r80717 | murf | 2007-08-24 08:48:49 -0600 (Fri, 24 Aug 2007) | 1 line This change addresses JerJer's complaint that aelparse builds and installs even if pbx_ael is unchecked in the menuselect stuff. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80718 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-15This commit closes bug 7605, and half-closes 7638. The AEL code has been ↵murf1-52/+42
redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79595 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-14Merged revisions 79255 via svnmerge from murf1-0/+11
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79255 | murf | 2007-08-13 11:49:54 -0600 (Mon, 13 Aug 2007) | 1 line This patch fixes bug 10411. I added a new regression test, some regression test cleanups ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵murf1-0/+1
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75400 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-05In regards to changes for 9508, expr2 system choking on floating point ↵murf1-0/+9
numbers, I'm adding this update to round out (no pun intended) and make this FP-capable version of the Expr2 stuff interoperate better with previous integer-only usage, by providing Functions syntax, with 20 builtin functions for floating pt to integer conversions, and some general floating point math routines that might commonly be used also. Along with this, I made it so if a function was not a builtin, it will try and find it in the ast_custom_function list, and if found, execute it and collect the results. Thus, you can call system functions like CDR(), CHANNEL(), etc, from within $\[..\] exprs, without having to wrap them in $\{...\} (curly brace) notation. Did a valgrind on the standalone and made sure there's no mem leaks. Looks good. Updated the docs, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@73449 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-02Merged revisions 57426 via svnmerge from murf1-0/+34
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r57426 | murf | 2007-03-01 22:21:36 -0700 (Thu, 01 Mar 2007) | 1 line I almost had comma escapes right, but 9184 points out the problem-- the escape is removed by pbx_config, and pbx_ael should also, before sending it down into the pbx engine. Also, you have to insert it back in, if you are generating extensions.conf code from the AEL. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57438 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-28Jason is having problems with the inclusion of <err.h>; it appears to be ↵murf1-3/+0
unnecessary for sucessful builds, so I either removed or commented out the inclusions from all the AEL related code. New outputs from bison/flex are included, etc. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49019 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-18Merged revisions 48554 via svnmerge from kpfleming1-2/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r48554 | kpfleming | 2006-12-18 05:59:24 -0600 (Mon, 18 Dec 2006) | 3 lines remove some now-unnecessary explicit includes of autoconfig.h clean up per-file dependencies during 'make clean' ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48555 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-24Merged revisions 46067 via svnmerge from russell1-6/+10
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r46067 | russell | 2006-10-23 21:27:42 -0400 (Mon, 23 Oct 2006) | 7 lines In muted.c, check the return value of strdup. In ael_main.c, check the return value of calloc. (issue #8157) In passing fix a few minor bugs in ael_main.c. The last argument to strncpy() was a hard-coded 100, where it should have been 99. I changed this to use sizeof() - 1. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46068 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-28My apologies, I missed the compiler warning in a previous commit for the ↵murf1-1/+1
ael_main.c; I've fixed this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41230 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-25Changes to fix all problems reported in 7804 are included here.murf1-1/+20
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41150 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-1/+3
- 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-11added a -q for quiet, option to aelparsemurf1-19/+30
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39543 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-09This commit adds the enhancemnt per bug 7606, addingmurf1-33/+266
the -w option to aelparse. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39431 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-10don't redefine PATH_MAXrussell1-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33422 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-10convert a few more uses of AST_CONFIG_MAX_PATH to use PATH_MAXrussell1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@33421 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07move autoconfig.h to the include/asterisk directory so it will get installedkpfleming1-1/+1
install asterisk.h include the system's default include directory git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32860 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-0/+2
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-20fix the build of func_realtime and aelparse with MTX_PROFILE enabledrussell1-3/+8
(issue #7187, #7188, casper) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@28895 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-02The build of aelparse was still broken in some cases, so instead of having to russell1-48/+0
keep figuring out workarounds for build issues on various platforms, just go ahead and remove what started all of this. Two instances of ast_calloc have been changed to calloc in pbx/ael/ael.y. ast_copy_string isn't actually needed here because the only place it is used is in ast_expr2f.c. However, the utils Makefile already builds its own ast_expr2f.o with -DSTANDALONE, which makes it use strncpy instead of ast_copy_string. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24115 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-01add missing functions - see the comment in the file explainingrizzo1-0/+39
in detail why this is needed and that hopefully this is a temporary workaround. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24020 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-01make sure non-inlined versions of ast_copy_string and _ast_calloc are availablerussell1-12/+10
in the cases where they are needed (issue #7054) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23984 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-27uncomment some functions in the flex code that were actuallyrizzo1-7/+5
used in the bison code - detected by making aelparse compile again. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22702 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-24Merge Steve Murphy's (murf) complete re-implementation of AEL, which is now ↵kpfleming1-0/+264
no longer considered experimental :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22273 f38db490-d61c-443f-a65b-d21fe96a405b