Luigi Rizzo
7afdb70d31
large rewrite of the extension matching code,
...
prerequisite to implement the specification defined yesterday.
While I have been using this code for months now, the change is large
so expect some instability.
Also the new specification (sorting extension by match length etc.)
is not implemented yet.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25928 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:31:42 +00:00
Luigi Rizzo
052191ec65
misc fixups
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:16:07 +00:00
Luigi Rizzo
6758577d97
remove trailing whitespace
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25914 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 08:03:52 +00:00
Luigi Rizzo
865785bffb
more code simplifications.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25892 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 07:49:17 +00:00
Luigi Rizzo
a7c5ce76f6
simplify matchcid()
...
define struct pbx_find_info for later use
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25861 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 06:17:42 +00:00
Luigi Rizzo
8d12c56f16
more small simplifications
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25856 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-09 06:04:45 +00:00
Luigi Rizzo
eb4ba3b888
another function restructured
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25749 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:53:57 +00:00
Luigi Rizzo
481cde0294
more code restructuring
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:47:03 +00:00
Luigi Rizzo
3b5fccac94
remove some common code in parsing function calls
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:15:31 +00:00
Luigi Rizzo
a8379be554
more code restructuring
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 22:06:50 +00:00
Luigi Rizzo
3a9bd2a478
restructure a function reducing nesting depth.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25717 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 21:49:22 +00:00
Luigi Rizzo
8a0476c335
fix indentation of a large block.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25715 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 21:09:03 +00:00
Luigi Rizzo
d54ec2ced4
minor code restructuring in preparation for more work.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 20:49:30 +00:00
Luigi Rizzo
123ebb0c99
localize some variables
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25652 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 16:14:29 +00:00
Luigi Rizzo
55c6781c9e
document th way extensions are sorted
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 15:32:53 +00:00
Russell Bryant
0fd612930a
- convert the lists of switches to use the linked list macros
...
- remove some checks of the result of ast_mutex_lock, since it is not necessary
(this would be a good project to add to the janitor projects list).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25443 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 11:20:19 +00:00
Russell Bryant
a252d79484
remove an XXX comment
...
- we can't use ast_true here because non-empty strings would no longer be
evaluated as true
document the return values of pbx_checkcondition() in doxygen format
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@25411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-08 10:08:20 +00:00
Russell Bryant
816a7cf13b
constify the argument to pbx_checkcondition
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-05 16:36:43 +00:00
Russell Bryant
0765f065ca
staticize the list heads from my recent conversions to list macros
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@24139 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-02 04:40:09 +00:00
Russell Bryant
992e0c1eed
- convert the list of dialplan function to the list macros
...
- add missing locking of the functions list in the "show functions" CLI command
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 15:09:51 +00:00
Russell Bryant
205d0aa430
convert the applications list to the list macros
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23853 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-01 03:14:21 +00:00
Russell Bryant
8085f4e14b
a bunch of conversion to ast_channel_*lock (issue #7058 )
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 14:50:18 +00:00
Luigi Rizzo
e61e34e8a1
simplify pbx_builtin_execiftime
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21906 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 13:44:15 +00:00
Luigi Rizzo
a702e1f001
simplify a function
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21879 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 12:58:39 +00:00
Luigi Rizzo
97d1c9a3c6
minor cleanup
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21878 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 12:12:42 +00:00
Luigi Rizzo
eb6dca850d
one more client for find_context_locked()
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21851 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 11:30:02 +00:00
Luigi Rizzo
73c8b06dcc
localize a variable, and make a minor code rearrangement.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21850 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-21 11:19:48 +00:00
Luigi Rizzo
da7721169d
one more client for find_context_locked(),
...
plus a few minor fixes.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 09:31:41 +00:00
Luigi Rizzo
065367db37
use a function, set_ext_pri(), to assign extension and priority.
...
On passing, fix a bug in __ast_pbx_run() where the wrong priority
was used in a call to ast_exists_extension() (see comment in the code).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21392 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 09:18:30 +00:00
Luigi Rizzo
91b441abdf
replace repeated code to walk contexts with a function,
...
find_context_locked()
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-19 08:52:15 +00:00
Kevin P. Fleming
bcecc3d863
doh! don't double-increment the bracket count for embedded references
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21236 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 23:25:22 +00:00
Kevin P. Fleming
c87f4bd7a8
don't ignore left-curly-braces when searching for the end of a variable/function reference; match them up with right-curly-braces so we choose the proper brace to end the reference (will still fail to parse properly if the reference contains unbalanced braces)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21235 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 23:24:02 +00:00
Luigi Rizzo
9df5296c9b
simplify logic in various functions, remove unnecessary variables
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 13:37:07 +00:00
Luigi Rizzo
9d825a2126
simplify a couple of functions.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20679 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-16 21:57:02 +00:00
Luigi Rizzo
147c9e5e73
misc. code cleanup
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 22:48:05 +00:00
Luigi Rizzo
1029b57707
constify a couple of function arguments
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20138 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 21:00:59 +00:00
Kevin P. Fleming
cf15740eaf
remove support for BYEXTENSION (which nobody even knows about anymore)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18977 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 23:01:22 +00:00
Luigi Rizzo
a36a1c8e2a
minor formatting changes again
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17902 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 16:44:31 +00:00
Joshua Colp
3f76f9e442
Merged revisions 17702 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r17702 | file | 2006-04-05 17:01:19 -0300 (Wed, 05 Apr 2006) | 2 lines
Unlock channel on failure so that ast_mutex_destroy doesn't throw a fit (issue #6647 reported by casper)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17726 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 20:05:09 +00:00
Kevin P. Fleming
2de95d53bc
Merged revisions 16742 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r16742 | kpfleming | 2006-03-31 12:24:22 -0600 (Fri, 31 Mar 2006) | 2 lines
ensure that hint watchers (subscribers) cannot be added or removed while the dialplan is being modified
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16743 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-31 18:28:52 +00:00
Luigi Rizzo
6c232811c0
as discussed with Mark a few weeks ago, the 'newstack' argument
...
in pbx_exec is always 1 so it can be removed.
This change also takes away ast_exec_extension(), and lets all
switch functions (exists, canmatch, exec, matchmore) all use the same
prototype, which makes the code a bit cleaner.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-30 21:29:39 +00:00
Russell Bryant
aa029f44f0
convert calloc and malloc+memset to ast_calloc and remove duplicate error messages
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16195 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 19:54:41 +00:00
Tilghman Lesher
a532c787f2
Merged revisions 16192 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r16192 | tilghman | 2006-03-29 13:11:18 -0600 (Wed, 29 Mar 2006) | 2 lines
Bug 6830 - Let GosubIf work with the same conditions as a GotoIf (change in API approved by Russell)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 19:30:57 +00:00
Luigi Rizzo
b5c5446ec4
another batch of cli simplifications.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 16:51:51 +00:00
Tilghman Lesher
0f48e2ba9e
Merged revisions 16082 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r16082 | tilghman | 2006-03-29 08:10:23 -0600 (Wed, 29 Mar 2006) | 2 lines
Bug 6835 - Updates to GotoIf help text
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@16083 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-29 14:24:30 +00:00
Kevin P. Fleming
e255a172f0
let's format that output sanely instead :-(
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15816 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:14:50 +00:00
Kevin P. Fleming
4bf8e92c1d
make 'show hints' CLI command show context name for each hint
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15815 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-28 22:09:38 +00:00
Matt O'Gorman
a5ece3388a
Janitor work converting !ast_strlen_zero(a)?a:b
...
to S_OR functions. from bug note 6805 with minor
modifications.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@15283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-27 19:31:54 +00:00
Kevin P. Fleming
be537d95eb
ensure global variables lock is held during 'show globals' CLI command
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:16:46 +00:00
Kevin P. Fleming
4b6ab497c8
correct typo
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@14508 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-23 21:06:26 +00:00