dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

67 Commits

Author SHA1 Message Date
murf 83c356e0a7 Spotted this bug today myself, trying to reproduce a BE bug. Use a vert bar instead of a comma, when calling RAND.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75505 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17 21:52:51 +00:00
murf c66181df61 In regards to changes for 9508, expr2 system choking on floating point 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-07-05 18:15:22 +00:00
murf a5df6622bc This finishes the changes for making Macro args LOCAL to the call, and allowing users to declare local variables.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70461 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20 20:10:19 +00:00
tilghman 535b46fc6f Merge work to make U(...) option work for Dial
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70358 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20 17:35:08 +00:00
murf 1de82b08fc Merged revisions 67526 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67526 | murf | 2007-06-05 15:30:18 -0600 (Tue, 05 Jun 2007) | 1 line

this fixes bug 9883, wherein macros were not allowing the includes construct. fixed and tested, looks OK. Now includes can serve as an adjunct to catch.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67529 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05 22:04:22 +00:00
murf 2acb6eaa29 Merged revisions 67420 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r67420 | murf | 2007-06-05 12:17:28 -0600 (Tue, 05 Jun 2007) | 1 line

Added code to automatically add a default case to switches that don't have one. In some cases, rather than fall thru, it results in a goto with -1 result, which terminates the extension; a sort of dialplan seqfault, sort of. This was required to fix bug reported in 9881
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67423 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-05 18:23:53 +00:00
murf b631bce5c3 Merged revisions 59688 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59688 | murf | 2007-04-02 11:31:32 -0600 (Mon, 02 Apr 2007) | 1 line

continue in for-loop should go to the incrementer, not the test. As per 9435, thanks to marcelbarbulescu
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59692 f38db490-d61c-443f-a65b-d21fe96a405b
2007-04-02 17:38:12 +00:00
murf e861d1ce31 Merged revisions 59261 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59261 | murf | 2007-03-27 12:16:32 -0600 (Tue, 27 Mar 2007) | 1 line

via 9373 (duplicate context in AEL crashes asterisk), kpfleming pointed on asterisk-dev, that DECLINE in this case the proper thing to do. This change now has it doing the proper thing.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59264 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-27 18:21:50 +00:00
murf 4e3fe3a800 Merged revisions 59228 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r59228 | murf | 2007-03-26 15:41:32 -0600 (Mon, 26 Mar 2007) | 1 line

fix for 9373 (duplicate context in AEL crashes asterisk). I turned a duplicate context from a WARNING to an ERROR. Now you get a module load failure, and asterisk just exits. That's better than a crash, right\?
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59233 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-26 21:47:37 +00:00
murf 22043a6e79 The fix for the AEL <<security hole>> (bug 9316) is here...
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59073 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-20 18:18:06 +00:00
murf 40b2713d84 Merged revisions 57426 via svnmerge from
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
2007-03-02 05:57:06 +00:00
murf 54fef797d3 Merged revisions 57049 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r57049 | murf | 2007-02-28 10:15:27 -0700 (Wed, 28 Feb 2007) | 1 line

I was surprised that I had not yet downgraded missing goto targets and macro call defs to a warning, in case they are in extensions.conf; I rectified this problem. Also, A goto in a macro to a target in a catch block was not being found; I fixed this too; the cause was that I needed to treat catch statements like an extension in the find_match code.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57050 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-28 17:22:45 +00:00
oej 10edb20a8e Doxygen additions, corrections
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@56665 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-24 20:29:41 +00:00
murf 47046d0ba7 Merged revisions 51409 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r51409 | murf | 2007-01-22 12:28:51 -0700 (Mon, 22 Jan 2007) | 1 line

This fixes 8836, according to dnatural
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51413 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-22 19:42:28 +00:00
murf fc79f14afc Merged revisions 49061 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r49061 | murf | 2006-12-29 17:40:37 -0700 (Fri, 29 Dec 2006) | 1 line

A fix for 8661, where the CUT func needed to have comma args converted to vertical bars. I hope this change does little harm.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49062 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-30 00:51:07 +00:00
file 289bbd4bb1 Clean up last commit to better conform to standards.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47556 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13 17:36:28 +00:00
murf 95c4f20c77 AEL need not complain about parkedcalls not being found... just confuses users
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47554 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13 17:32:16 +00:00
kpfleming 470f688a28 Merged revisions 46200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines

apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@46201 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-25 14:44:50 +00:00
murf e38441a0ee Correction for bug 8128 in trunk
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45078 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-13 18:08:33 +00:00
murf 5f6e374d84 These mods fix a problem pointed out by dgartang, where in certain situations, the target of a goto cannot be found, even right under your nose. This is because the current context is not updated properly, and rather than waste time and find why and where the context should have been updated, I just use my newly added 'dad' ptrs, and pop until I have either the context or extension, and use that instead.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44489 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-05 18:29:06 +00:00
murf a2c2aa216d These changes resolve the problems in bug 8090, where there's a crash compiling an empty context
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44377 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04 19:33:37 +00:00
murf c54501d641 These changes correspond to the changes to app_stack's Gosub() application
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44263 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-03 16:42:26 +00:00
murf 52da543985 This commits the changes to AEL to use the gosub-with-args from Tilghman to perform macro calls. This results in substantially smaller stack footprint, which allows macro call depths in excess of 100,000 levels, rather than the limit of 7 calls deep, which the Macro app is subject to.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43747 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27 03:45:22 +00:00
murf 03723031d2 This commits a change to return MODULE_LOAD_FAILURE on error, and SUCCESS (instead of 0) when all goes well for bug 8004
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43507 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-22 21:34:04 +00:00
murf d55e6f507d As per bug 8004, we now return AST_MODULE_LOAD_DECLINE when we can't read extensions.ael
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43506 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-22 21:17:07 +00:00
mattf b759835a90 Various updates from PCadach's chan_h323-live branch
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43294 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-19 21:07:49 +00:00
kpfleming 5aacb6a82d merge qwell's CLI verbification work
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18 19:54:18 +00:00
murf 5c397dd961 Changes to fix all problems reported in 7804 are included here.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41150 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-25 20:43:51 +00:00
file 9276fda5d0 Make a warning about an unused function & variable go away on the stand alone AEL build.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40819 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-22 02:24:46 +00:00
kpfleming 8b0c007ad9 merge new_loader_completion branch, including (at least):
- 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-21 02:11:39 +00:00
russell 7eba1e86bd Merge team/russell/ast_verbose_threadstorage
- instead of defining a free() wrapper in a bunch of files, define it as
  ast_free() in utils.h and remove the copies from all the files.

- centralize and abstract the code used for doing thread storage. The code
  lives in threadstorage.h, with one function being implemented in utils.c.
  This new API includes generic thread storage as well as special functions
  for handling thread local dynamic length string buffers.

- update ast_inet_ntoa() to use the new threadstorage API
- update ast_state2str() to use the new threadstorage API
- update ast_cli() to use the new threadstorage API

- Modify manager_event() to use thread storage. Instead of using a buffer of
  4096 characters as the workspace for building the manager event, use a thread
  local dynamic string.  Now there is no length limitation on the length of the
  body of a manager event.

- Significantly simplify the handling of ast_verbose() ...
  - Instead of using a static char buffer and a lock to make sure only one
    thread can be using ast_verbose() at a time, use a thread local dynamic
    string as the workspace for preparing the verbose message. Instead of
    locking around the entire function, the only locking done now is when the
    message has been built and is being deliviered to the list of registered
    verbose message handlers.
  - This function was doing a strdup() on every message passed to it and
    keeping a queue of the last 200 messages in memory. This has been
    completely removed. The only place this was used was that if there were
    any messages in the verbose queue when a verbose handler was registered,
    all of the messages in the queue would be fed to it.  So, I just made sure
    that the console verbose handler and the network verbose handler (for
    remote asterisk consoles) were registered before any verbose messages.
    pbx_gtkconsole and pbx_kdeconsole will now lose a few verbose messages at
    startup, but I didn't feel the performance hit of this message queue was
    worth saving the initial verbose output for these very rarely used modules.
  - I have removed the last three arguments to the verbose handlers, leaving
    only the string itself because they aren't needed anymore. For example,
    ast_verbose had some logic for telling the verbose handler to add
    a newline if the buffer was completely full. Now that the buffer can grow
    as needed, this doesn't matter anymore.
  - remove unused function, ast_verbose_dmesg() which was to dispatch the
    message queue
  - Convert the list of verbose handlers to use the linked list macros.

- add missing newline characters to a few ast_verbose() calls

- convert the list of log channels to use the linked list macros in logger.c

- fix close_logger() to close all of the files it opened for logging

- update ast_log() to use a thread local dynamic string for its workspace
  for preparing log messages instead of a buffer of size BUFSIZ (8kB on my
  system) allocated on the stack.  The dynamic string in this case is limited
  to only growing to a maximum size of BUFSIZ.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39272 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-08 06:32:04 +00:00
murf ae7ab1aff9 The contents of branch teams/murf/bug_7598 are being folded in here.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39151 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07 12:59:47 +00:00
murf 0d2c199eca This branch will resolve the bug 7635.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38652 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01 19:03:32 +00:00
murf 0a1d33454c committing a fix for colons in goto arguments and suppressing operator messages in globals assignments.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37925 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19 02:55:24 +00:00
russell 0851906c83 merge changes from team/murf/AEL-trunk-fixesonly
- fix callerid matching for extensions
 - fix nested switch statements
 - fix compilation with bison 2.1a or higher
(issue #7309)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34665 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-18 21:36:24 +00:00
kpfleming 73c525e6e2 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07 18:54:56 +00:00
tilghman 56d7229005 Bug 7062 - Rename ael2 CLI commands to ael
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@24075 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-01 22:07:18 +00:00
rizzo 52268e0664 make destroy_pval able to handle a NULL value
(the warning should be removed);
define a 'elements_block' rule to simplify some other rules
removing duplicated code - runtests seems happy with this.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23613 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-30 12:30:08 +00:00
rizzo 3a16c3d072 include/asterisk/ael_structs.h:
- protect against multiple includes of ael_structs.h
  - remove prototypes for unused or undeclared functions

pbx/ael/ael.y
  - staticize functions as appropriate
  - constify arguments
  - remove useless extern

pbx/ael/ael.flex
  - ifdef out unused functions

pbx/pbx_ael.c
  - constify some variables and arguments
  - ifdef out unused functions
  - staticize functions as appropriate

update generated files accordingly 



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22654 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-26 22:41:16 +00:00
rizzo 62f50212c0 fix variable declaration in the middle of a block
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22413 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-25 17:06:37 +00:00
kpfleming 6baa8fbab8 Merge Steve Murphy's (murf) complete re-implementation of AEL, which is now no longer considered experimental :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22273 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-24 17:41:27 +00:00
rizzo 3664249356 This rather large commit changes the way modules are loaded.
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-14 14:08:19 +00:00
kpfleming e4880150b1 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08 22:01:19 +00:00
russell e4c28d165d Merged revisions 15658 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r15658 | russell | 2006-03-28 13:09:05 -0500 (Tue, 28 Mar 2006) | 2 lines

fix the order in which for loops are expanded (issue #6810)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@15659 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-28 18:13:53 +00:00
tilghman 70141a02c7 Merged revisions 7577 via svnmerge from
/branches/1.2


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7578 f38db490-d61c-443f-a65b-d21fe96a405b
2005-12-21 19:24:56 +00:00
kpfleming 24c1e3c222 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 f38db490-d61c-443f-a65b-d21fe96a405b 2005-11-29 18:24:39 +00:00
kpfleming 18013517e4 issue #5761
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7113 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-16 17:16:23 +00:00
markster a6c125b59e Never call load_module / unload_module
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7093 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-13 02:19:14 +00:00
kpfleming 0406912cf9 issue #5354
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7060 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-11 00:14:13 +00:00
kpfleming 99e5289a45 issue #5701
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7055 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-10 23:28:55 +00:00