aboutsummaryrefslogtreecommitdiffstats
path: root/pbx
AgeCommit message (Collapse)AuthorFilesLines
2008-03-27(closes issue #12302)murf1-53/+96
Reported by: pj Tested by: murf These changes will set a channel variable ~~EXTEN~~ just before generating code for a switch, with the value of ${EXTEN}. The exten is marked as having a switch, and ever after that, till the end of the exten, we substitute any ${EXTEN} with ${~~EXTEN~~} instead in application arguments; (and the ${EXTEN: also). The reason for this, is that because switches are coded using separate extensions to provide pattern matching, and jumping to/from these switch extensions messes up the ${EXTEN} value, which blows the minds of users. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@111341 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18(closes issue #11903)murf15-21/+125
Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@109309 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11fix up various compiler warnings found with gcc-4.3:kpfleming1-1/+1
- the output of flex includes a static function called 'input' that is not used, so for the moment we'll stop having the compiler tell us about unused variables in the flex source files (a better fix would be to improve our flex post-processing to remove the unused function) - main/stdtime/localtime.c makes assumptions about signed integer overflow, and gcc-4.3's improved optimizer tries to take advantage of handling potential overflow conditions at compile time; for now, suppress these optimizations until we can fiure out if the code needs improvement - main/udptl.c has some references to uninitialized variables; in one case there was no bug, but in the other it was certainly possibly for unexpected behavior to occur - main/editline/readline.c had an unused variable git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@107352 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-06ensure that all remaining multi-object modules are built using their proper ↵kpfleming1-0/+4
CFLAGS and include directory paths git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102627 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-27When deleting a task from the scheduler, ignoring the return value couldtilghman1-24/+9
possibly cause memory to be accessed after it is freed, which causes all sorts of random memory corruption. Instead, if a deletion fails, wait a bit and try again (noting that another thread could change our taskid value). (closes issue #11386) Reported by: flujan Patches: 20080124__bug11386.diff.txt uploaded by Corydon76 (license 14) Tested by: Corydon76, flujan, stuarth` git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@100465 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Fix up setting the EID on BSD based systems.russell1-7/+5
(closes issue #11646) Reported by: caio1982 Patches: dundi_osx_eid6.diff.txt uploaded by caio1982 (license 22) dundi_osx_eid6-1.4.diff uploaded by caio1982 (license 22) Tested by: caio1982, mvanbaak git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@98390 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Applied the same fixes for ael.flex as was done in 97849 for ast_expr2.fl; ↵murf3-134/+152
overrode the normally generate yyfree func with our own version that checks the pointer for non-null before passing to free(). Also takes care of a little problem with 2.5.33 and the use of the __STDC_VERSION__ macro. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97889 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Remove other remnants of pbx_kdeconsolerussell2-118/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97753 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Remove pbx_kdeconsole from the tree. It hasn't worked in ages, and nobody hasrussell1-66/+0
complained. (closes issue #11706, reported by caio1982) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97734 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Strip terminal sequences from the verbose messagesrussell1-1/+7
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97645 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Make pbx_gtkconsole build ... but doesn't actually load on my system stillrussell1-27/+18
(related to issue #11706) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97640 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02Convert locks of the contexts list in pbx_config to the appropriate rdlock ↵russell1-25/+25
or wrlock git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96024 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02pbx_dundi only needs a rdlock on the contexts list.russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@96022 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17fix some copy-and-paste leftoverskpfleming1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@93183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html,kpfleming1-2/+8
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: http://svn.digium.com/svn/asterisk/branches/1.4@93180 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Use ast_free to free memory, or else we shall implode if MALLOC_DEBUG is ↵file1-2/+2
enabled. (closes issue #11347) Reported by: ys Patches: pbx.pbx_config.c.diff uploaded by ys (license 281) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89592 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07In response to 10578, I just ran 1.4 thru valgrind; some of the config ↵murf1-2/+5
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: http://svn.digium.com/svn/asterisk/branches/1.4@89088 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-31closes issue #11108 -- where the 'dialplan save' cli command saves a file ↵murf1-1/+1
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: http://svn.digium.com/svn/asterisk/branches/1.4@87849 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-31Included some verbage in the check_includes func, to inform the user that ↵murf1-2/+3
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: http://svn.digium.com/svn/asterisk/branches/1.4@87775 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26closes issue #11086 where a user complains that references to following ↵murf8-1071/+1090
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/branches/1.4@87168 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-24closes issue #11037 -- unable to specify app:spec in hint argumentsmurf2-401/+415
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86936 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22Fix tab completion for dundi show peer.file1-1/+3
(closes issue #11041) Reported by: jsmith Patches: asterisk-dundicomplete.diff.txt uploaded by jamesgolovich (license 176) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@86661 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15Ensure the buffer passed to ast_canmatch_extension() is properly initialized sorussell1-2/+2
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: http://svn.digium.com/svn/asterisk/branches/1.4@85556 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-14Don't create the context for users in users.conf until we know at least one ↵russell1-4/+11
user exists. (closes issue #10971) Reported by: dimas Patches: pbxconfig.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85540 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-12Fix the potential use of an uninitialized buffer in a log message.russell1-2/+4
(closes issue #10958) Reported by: dimas Patches: realtime.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@85515 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-03closes issue #10870 ; where a CUT() function call in a switch expr doesn't ↵murf1-8/+29
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: http://svn.digium.com/svn/asterisk/branches/1.4@84544 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-03closes issue #10834 ; where a null input to a switch statement results in a ↵murf9-52/+158
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: http://svn.digium.com/svn/asterisk/branches/1.4@84511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01Anything to keep gcc 4.2 happy...murf1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84273 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-01closes issue #10777 -- by returning a null for the parse tree when there's ↵murf3-5/+7
really nothing there, and making sure we don't try to do checking on a null tree. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84239 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-29This is a regression update that matches what I did in 84134 for AEL ↵murf16-44/+174
regressions. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84135 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-29This issue sort of closes 10786; All config files support #include with ↵murf2-180/+349
globbing (you know, *,[chars],?,{list,list},etc), so I've updated the AEL system to support this also. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@84133 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-27remove a todo item that has been completedrussell1-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@83976 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-22This closes issue #10788 -- The exact same fixes are made here for the first ↵murf1-3/+38
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: http://svn.digium.com/svn/asterisk/branches/1.4@83589 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-22This closes issue #10788 -- the 3rd arg in the for statement is now wrapped ↵murf1-5/+40
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: http://svn.digium.com/svn/asterisk/branches/1.4@83558 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21gcc 4.2 has a new set of warnings dealing with cosnt pointers. This set ofrussell3-20/+18
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/branches/1.4@83432 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-18When copying the contents from the wildcard peer, do a deep copy instead ofrussell1-1/+31
shallow copy so that it doesn't crash when beging destroyed. (closes issue #10546, patch by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82802 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-13Fix a small typo.qwell1-1/+1
retrytime > waittime git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82358 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-11The sample dundi.conf claims support for a wildcard peer entry - [*], but therussell1-3/+34
code did not support it. This patch makes it work. (closes issue #10546, patch by dds, with some changes by me) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82250 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-11(closes issue #10577)file1-0/+5
Reported by: jamesgolovich Patches: asterisk-dundifree.diff.txt uploaded by jamesgolovich (license 176) Don't leak memory when unloading DUNDi. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@82243 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-28revert unintentional changes in rev 81226russell1-5/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81228 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-28Add Russian tones. (closes issue #7953, hanabana)russell1-0/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81226 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-27Add a \todo to note that this module leaks most of the memory it allocates onrussell1-0/+1
unload and should be fixed (when I'm not in the middle of something else ...). git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81074 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-27explicity define a variable as a booleanrussell1-1/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@81065 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-24backport of 80649, a fix to an unreported problem in the ael parser, that ↵murf3-236/+230
results in a crash on a 64bit machine git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@80689 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13memset really, really needs to be used here.murf1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79363 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-13This patch fixes bug 10411. I added a new regression test, some regression ↵murf9-129/+193
test cleanups git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79255 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-10From a user complaint on #asterisk, I have forced pbx_spool to explain what ↵murf1-1/+1
reason codes mean, when they are logged git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@79099 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Backport GCC 4.2 fixes. Without these Asterisk won't build under devmode ↵file1-1/+1
using GCC 4.2. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@75712 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18(closes issue #10224)file1-6/+7
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: http://svn.digium.com/svn/asterisk/branches/1.4@75583 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-09Few minor thread synchronization tweaks. (issue #10124 reported by gzero)file1-4/+13
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@74045 f38db490-d61c-443f-a65b-d21fe96a405b