Russell Bryant
ec8a896935
Convert locks of the contexts list in pbx_config to the appropriate rdlock or wrlock
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96024 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 22:14:28 +00:00
Russell Bryant
93748ccb9c
pbx_dundi only needs a rdlock on the contexts list.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@96022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-02 22:04:47 +00:00
Kevin P. Fleming
fd1e942f53
fix some copy-and-paste leftovers
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:21:08 +00:00
Kevin P. Fleming
627f595c58
In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html ,
...
rizzo brought up some issues related to the way that the metadata required
for menuselect and the rest of the build system is extracted from the source
files. Since I had a few hours to kill on an airplane today, I decided to
improve this situation... so now the system caches the extracted metadata
and uses it to build the menuselect 'tree' as much as it can. The result
of this is that when a single source file is changed, only the metadata for
that file needs to be extracted again, and the rest is used from the cache
files. I also reduced the number of forked processes required to do the
metadata extraction; it was actually possible to do most of what we needed
in the Makefiles themselves without using any shell scripts at all! On my
laptop, these changes resulted in an 80% decrease in the time required
for the 'menuselect.makeopts' automatic check to occur after editing a single
source file.
While doing this work I also cleaned up a few minor things in the Makefiles,
adding a check for 'awk' to the configure script and changed all remaining
places we use 'grep' or 'awk' to use the ones found by the configure script,
and changed the 'prep_tarball' script to build the menuselect metadata so
that tarballs of Asterisk will include it and won't require the user to
wait while it is extracted after unpacking.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@93180 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 06:44:51 +00:00
Joshua Colp
107209927a
Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is enabled.
...
(closes issue #11347 )
Reported by: ys
Patches:
pbx.pbx_config.c.diff uploaded by ys (license 281)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-26 17:36:45 +00:00
Steve Murphy
164d8a5e61
In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@89088 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 21:40:28 +00:00
Steve Murphy
3176ba94c3
closes issue #11108 -- where the 'dialplan save' cli command saves a file where the semicolon is not escaped. Fixed this; User also wanted comments to be preserved across dialplan save, but this is impossible at this point in time, because comments are not stored in the dialplan. They are 'compiled' out of extensions.conf. The only way to preserve those comments is to use the config file reader/writer that the GUI uses to allow online user edits. extensions.conf is first and foremost, a config file, and is read in by the normal config-file reading routines. Then, it is processed into a dialplan (context/exten structs).
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87849 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-31 17:49:39 +00:00
Steve Murphy
6addd141d9
Included some verbage in the check_includes func, to inform the user that included contexts that have no match in the AEL, might be OK, as AEL cannot check in the extensions.conf or the in-memory contexts, as they may not be there at the time of the check.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@87775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-31 03:51:52 +00:00
Steve Murphy
4c7393a6a4
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@87168 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-26 16:34:02 +00:00
Steve Murphy
94aabf9844
closes issue #11037 -- unable to specify app:spec in hint arguments
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86936 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-24 04:14:28 +00:00
Joshua Colp
796cc69527
Fix tab completion for dundi show peer.
...
(closes issue #11041 )
Reported by: jsmith
Patches:
asterisk-dundicomplete.diff.txt uploaded by jamesgolovich (license 176)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@86661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22 14:05:26 +00:00
Russell Bryant
ca69081253
Ensure the buffer passed to ast_canmatch_extension() is properly initialized so
...
that it is null terminated.
(issue #10977 )
Reported by: dimas
Patches:
pbxdundi.patch uploaded by dimas (license 88)
- small mods by me
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85556 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-15 15:40:45 +00:00
Russell Bryant
91bfacc3ed
Don't create the context for users in users.conf until we know at least one user exists.
...
(closes issue #10971 )
Reported by: dimas
Patches:
pbxconfig.patch uploaded by dimas (license 88)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-14 15:24:52 +00:00
Russell Bryant
c27db984f9
Fix the potential use of an uninitialized buffer in a log message.
...
(closes issue #10958 )
Reported by: dimas
Patches:
realtime.patch uploaded by dimas (license 88)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@85515 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-12 15:40:35 +00:00
Steve Murphy
563c9e74a2
closes issue #10870 ; where a CUT() function call in a switch expr doesn't execute correctly, because the commas in the function args are not converted to vertbars before the func is called. I modified just the switch code to convert the commas to vertbars if there, but if more of these sort of probs are found, I may have to resort to something a little more fundamental. We'll see, I guess.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84544 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-03 18:20:07 +00:00
Steve Murphy
ed75fa38e9
closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-03 14:23:00 +00:00
Steve Murphy
8bf81e2bac
Anything to keep gcc 4.2 happy...
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 21:18:40 +00:00
Steve Murphy
b7f66e48e8
closes issue #10777 -- by returning a null for the parse tree when there's really nothing there, and making sure we don't try to do checking on a null tree.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84239 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 20:27:52 +00:00
Steve Murphy
fce1741a01
This is a regression update that matches what I did in 84134 for AEL regressions.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84135 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29 23:00:37 +00:00
Steve Murphy
0ffda2d201
This issue sort of closes 10786; All config files support #include with globbing (you know, *,[chars],?,{list,list},etc), so I've updated the AEL system to support this also.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@84133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29 21:47:53 +00:00
Russell Bryant
a4dcd03dcb
remove a todo item that has been completed
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-27 00:01:29 +00:00
Steve Murphy
4cd59ff447
This closes issue #10788 -- The exact same fixes are made here for the first arg in the for(arg1; arg2; arg3) {} statement, as were done for the 3rd arg. It can now be an assignment that will embedded in a Set() app, or a macro call, or an app call.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83589 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22 19:39:16 +00:00
Steve Murphy
eef551c063
This closes issue #10788 -- the 3rd arg in the for statement is now wrapped in Set() only if there's an '=' in that string. Otherwise, if it begins with '&', then a Macro call is generated; otherwise it is made into an app call. A bit more accomodating, keeps the new guys happy, and the guys with ael-1 code should be happy, too
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@83558 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-22 16:41:43 +00:00
Russell Bryant
d6b8fb4dc0
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@83432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 14:37:20 +00:00
Russell Bryant
885a35488a
When copying the contents from the wildcard peer, do a deep copy instead of
...
shallow copy so that it doesn't crash when beging destroyed.
(closes issue #10546 , patch by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82802 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18 16:31:01 +00:00
Jason Parker
6da68a5f0a
Fix a small typo.
...
retrytime > waittime
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82358 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 23:11:27 +00:00
Russell Bryant
057505c5a3
The sample dundi.conf claims support for a wildcard peer entry - [*], but the
...
code did not support it. This patch makes it work.
(closes issue #10546 , patch by dds, with some changes by me)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82250 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 16:03:42 +00:00
Joshua Colp
f2ba32f8e9
(closes issue #10577 )
...
Reported by: jamesgolovich
Patches:
asterisk-dundifree.diff.txt uploaded by jamesgolovich (license 176)
Don't leak memory when unloading DUNDi.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@82243 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-11 14:56:39 +00:00
Russell Bryant
dce43f8d32
revert unintentional changes in rev 81226
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81228 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 15:43:18 +00:00
Russell Bryant
9b1802ffa3
Add Russian tones. (closes issue #7953 , hanabana)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-28 15:41:15 +00:00
Russell Bryant
a9c8aa431f
Add a \todo to note that this module leaks most of the memory it allocates on
...
unload and should be fixed (when I'm not in the middle of something else ...).
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81074 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 17:27:48 +00:00
Russell Bryant
264aeeca70
explicity define a variable as a boolean
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@81065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-27 16:38:33 +00:00
Steve Murphy
765b1af228
backport of 80649, a fix to an unreported problem in the ael parser, that results in a crash on a 64bit machine
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@80689 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-24 13:20:18 +00:00
Steve Murphy
7d83255ef8
memset really, really needs to be used here.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79363 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 22:40:06 +00:00
Steve Murphy
9020699e0a
This patch fixes bug 10411. I added a new regression test, some regression test cleanups
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13 17:49:54 +00:00
Steve Murphy
241769b53c
From a user complaint on #asterisk, I have forced pbx_spool to explain what reason codes mean, when they are logged
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@79099 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-10 20:53:43 +00:00
Joshua Colp
6d143d401f
Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode using GCC 4.2.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 20:00:23 +00:00
Joshua Colp
f836d642f9
(closes issue #10224 )
...
Reported by: irroot
Record the threadid of each running thread before shutting them down as the thread themselves may change the value.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@75583 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 14:18:53 +00:00
Joshua Colp
ce4e654f2c
Few minor thread synchronization tweaks. (issue #10124 reported by gzero)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@74045 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 14:49:05 +00:00
Joshua Colp
1944dea3bd
Add a few sanity checks when writing out the dialplan. (issue #10157 reported by dome)
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@73930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-09 01:13:57 +00:00
Russell Bryant
fde5578a20
Merged revisions 72805 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r72805 | russell | 2007-07-01 18:51:34 -0500 (Sun, 01 Jul 2007) | 5 lines
When appending lines to call files to keep track of retries, write a leading
newline just in case the original call file did not have a newline at the end.
This fix is in response to a problem I saw reported on the asterisk-users
mailing list.
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@72806 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-01 23:52:45 +00:00
Russell Bryant
9fe9682f50
Merged revisions 72267 via svnmerge from
...
https://origsvn.digium.com/svn/asterisk/branches/1.2
........
r72267 | russell | 2007-06-27 16:06:45 -0500 (Wed, 27 Jun 2007) | 5 lines
Fix a minor issue with parsing the priority number. You could have as much
whitespace as you want around a numeric priority, but you couldn't have any
whitespace around a special priority like "n" or "hint".
(issue #10039 , reported by mitheloc, fixed by me)
........
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@72272 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 21:08:34 +00:00
Joshua Colp
76c9d2be11
Make unloading of pbx_dundi actually work.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@72006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-27 00:58:35 +00:00
Tilghman Lesher
5ed9d5d64b
"dialplan save" produced garbage in the config file
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@68595 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-11 04:21:30 +00:00
Steve Murphy
dc63d79143
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@67526 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 21:30:18 +00:00
Steve Murphy
b698ff265b
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@67420 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-05 18:17:28 +00:00
Steve Murphy
9056b0fa09
updated the ael regressions to match what's in trunk
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@62913 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 14:41:53 +00:00
Steve Murphy
fd54b47404
These mods fix bug 9623, where an '@' in the eswitch contents causes a syntax error. I also updated the regressions.
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@62883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 13:54:56 +00:00
Steve Murphy
48b277a047
continue in for-loop should go to the incrementer, not the test. As per 9435, thanks to marcelbarbulescu
...
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@59688 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-04-02 17:31:32 +00:00
Steve Murphy
bd5967ea0c
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: https://origsvn.digium.com/svn/asterisk/branches/1.4@59261 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-27 18:16:32 +00:00