aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
AgeCommit message (Collapse)AuthorFilesLines
2010-01-21Guard against division by zero.tilghman1-1/+5
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@241765 f38db490-d61c-443f-a65b-d21fe96a405b
2010-01-06Revise documentation on disposition values to the actual values used.tilghman1-4/+5
(closes issue #16289) Reported by: wdoekes git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@238230 f38db490-d61c-443f-a65b-d21fe96a405b
2009-12-02fixes segfault in func_groupcountdvossel1-0/+4
closes issue #16337) Reported by: Parantido Patches: issue_16337.diff uploaded by dvossel (license 671) Tested by: Parantido, dvossel git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@232268 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-12fixes merging error, datastore was being freed in the wrong function.dvossel1-1/+2
(closes issue #16219) Reported by: aragon git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@229669 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06Properly handle '=' while decoding base64 messages and null terminate ↵mnicholson1-1/+8
strings returned from BASE64_DECODE. (closes issue #15271) Reported by: chappell Patches: base64_fix.patch uploaded by chappell (license 8) Tested by: kobaz git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@228378 f38db490-d61c-443f-a65b-d21fe96a405b
2009-11-06fixes memory leak in func_audiohookinherit.cdvossel1-0/+1
(closes issue 0015394) Reported by: boroda Patches: bug15394_memoryleak_diff2.txt uploaded by dbrooks (license 790) Tested by: dbrooks, boroda git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@228272 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30changed the prototype definition of csv_quotemnick1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@221303 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30added a new dialplan function 'CSV_QUOTE' and changed the cdr_custom.sample.confmnick1-0/+39
(closes issue #15471) Reported by: dkerr Patches: csv_quote_14.txt uploaded by mnick (license ) Tested by: mnick git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@221157 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30check bounds - prevents for buffer overflowmnick1-1/+7
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@221153 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman5-13/+13
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@211528 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-03Reverting index() fix, applying a different methodology, based upon ↵tilghman1-2/+2
developer discussions. (related to issue #15639) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@210066 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-21Force an error if a blank is passed to QUOTE (because the documentation ↵tilghman1-0/+6
states the argument is not optional). This change makes URIENCODE and QUOTE behave similarly, since the documentation states that the argument is not optional, for both. (closes issue #15439) Reported by: pkempgen Patches: 20090706__issue15439.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@207945 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-16Fix a memory leak.tilghman1-0/+2
(closes issue #15517) Reported by: adomjan Patches: func_realtime.c-ast_variable_destroy.diff uploaded by adomjan (license 487) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@206807 f38db490-d61c-443f-a65b-d21fe96a405b
2009-06-29Revision 189537 was supposed to make 1.4 more correct. Instead, it broke ↵tilghman2-35/+2
func_odbc. Reverting. (closes issue #15317, issue #14614) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@204170 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-27Use a different determinator on whether to print the delimiter, since ↵tilghman1-5/+6
leading fields may be blank. (closes issue #15208) Reported by: ramonpeek Patch by me, though inspired in part by a patch from ramonpeek git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@197194 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-11Document CHANNEL(transfercapability) in CLI documentation.lmadsen1-0/+2
(issue #15073) Reported by: pkempgen Patches: 20090511__issue15073.diff.txt uploaded by tilghman (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@193544 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-20Add a workaround for func_odbc/ARRAY() for problems that occur with certain ↵tilghman2-2/+35
special characters. In certain cases, due to the way Set() works in 1.4, values may not get set properly. This is a workaround for 1.4 only that corrects for these issues, without making func_odbc more difficult to use properly. (closes issue #14614) Reported by: wdoekes Patches: 20090309__bug14614__2.diff.txt uploaded by tilghman (license 14) double_set_unescape_workaround_for_func_odbc.osso-and-tilghman-1.diff uploaded by wdoekes (license 717) Tested by: wdoekes, tilghman git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@189537 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13Revert unnecessary indications API change from rev 122314russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168561 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-13If either conditional is NULL, don't try copying it.tilghman1-1/+1
(closes issue #14226) Reported by: caspy Patches: 20090113__bug14226.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@168546 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-19Backport of AUDIOHOOK_INHERIT for Asterisk 1.4mmichelson1-0/+282
(closes issue #13538) Reported by: mbit Patches: 13538.patch uploaded by putnopvut (license 60) Tested by: putnopvut git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@166157 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-11Fix some observed slowdowns in dialplan processing.russell2-18/+0
The change is to remove autoservice usage from dialplan functions that do not need it because they do not perform operations that potentially block. (closes issue #13940) Reported by: tbelder git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@163253 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-03(closes issue #13597)murf1-1/+14
Reported by: john8675309 Patches: patch.13597 uploaded by murf (license 17) Tested by: murf, john8675309 This patch causes the setcid func to update the CDR clid after setting the channel field. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@160703 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-03somehow missed a bunch of gcc 4.3.x warnings in this branch on the first passkpfleming1-24/+39
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@153823 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01fix a bunch of potential problems found by gcc 4.3.x, primarily bare strings ↵kpfleming1-2/+2
being passed to printf()-like functions and ignored results from read()/write() and friends git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@153337 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-29The magic trick to avoid this crash is not tomurf1-5/+1
try to find the channel by name in the list, which is slow and resource consuming, but rather to pay attention to the result codes from the ast_bridge_call, to which I added the AST_PBX_NO_HANGUP_PEER_PARKED value, which now are returned when a channel is parked. If you get AST_PBX_KEEPALIVE, then don't touch the channel pointer. If you get AST_PBX_NO_HANGUP_PEER, or AST_PBX_NO_HANGUP_PEER_PARKED, then don't touch the peer pointer. Updated the several places where the results from a bridge were not being properly obeyed, and fixed some code I had introduced so that the results of the bridge were not overridden (in trunk). All the places that previously tested for AST_PBX_NO_HANGUP_PEER now have to check for both AST_PBX_NO_HANGUP_PEER and AST_PBX_NO_HANGUP_PEER_PARKED. I tested this against the 4 common parking scenarios: 1. A calls B; B answers; A parks B; B hangs up while A is getting the parking slot announcement, immediately after being put on hold. 2. A calls B; B answers; A parks B; B hangs up after A has been hung up, but before the park times out. 3. A calls B; B answers; B parks A; A hangs up while B is getting the parking slot announcement, immediately after being put on hold. 4. A calls B; B answers; B parks A; A hangs up after B has been hung up, but before the park times out. No crash. I also ran the scenarios above against valgrind, and accesses looked good. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@152535 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-26Since passing \0 as the second argument to strchr is valid (and willseanbright1-4/+4
match the trailing \0 of a string) we need to check that first, otherwise we end up with incorrect results. Fix suggested by reporter. (closes issue #13787) Reported by: meitinger git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@152059 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Dialplan functions should not actually return 0, unless they have modified thetilghman7-15/+35
workspace. To signal an error (and no change to the workspace), -1 should be returned instead. (closes issue #13340) Reported by: kryptolus Patches: 20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@146799 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-02Backport support for some of the keyword modifications used in 1.6 (while ↵tilghman1-2/+8
warning that some options aren't really supported) and add some warning messages. Some credit to oej, who was complaining in #asterisk-dev. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@145839 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-15Additional check for more string specifiers than arguments.tilghman1-4/+15
(closes issue #13299) Reported by: adomjan Patches: 20080813__bug13299.diff.txt uploaded by Corydon76 (license 14) func_strings.c-sprintf.patch uploaded by adomjan (license 487) Tested by: adomjan git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@138023 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-30Fix a memory leak in func_curl. Every thread that used this function leakedrussell1-0/+2
an allocation the size of a pointer. (reported by jmls in #asterisk-dev) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@134540 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12Adds DAHDI support alongside Zaptel. DAHDI usage favored, but all Zap stuff ↵jpeeler1-1/+1
should continue working. Release announcement to follow. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122314 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12(closes issue #10668)murf1-6/+24
Reported by: arkadia Tested by: murf, arkadia Options added to forkCDR() app and the CDR() func to remove some roadblocks for CDR applications. The "show application ForkCDR" output was upgraded to more fully explain the inner workings of forkCDR. The A option was added to forkCDR to force the CDR system to NOT change the disposition on the original CDR, after the fork. This involves ast_cdr_answer, _busy, _failed, and so on. The T option was added to forkCDR to force obedience of the cdr LOCKED flag in the ast_cdr_end, all the disposition changing funcs (ast_cdr_answer, etc), and in the ast_cdr_setvar func. The CHANGES file was updated to explain ALL the new options added to satisfy this bug report (and some requests made verbally and via email, irc, etc, over the past months/year) The 's' option was added to the CDR() func, to force it to skip LOCKED cdr's in the chain. Again, the new options should be totally transparent to existing apps! Current behavior of CDR, forkCDR, and the rest of the CDR system should not change one little bit. Until you add the new options, at least! git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@122046 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-22Take into account the length of delimiters when calculating result string ↵tilghman1-1/+1
length. (closes issue #12696) Reported by: adomjan Patches: func_realtime.c-longdelimiter.patch uploaded by adomjan (license 487) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@117809 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-07Force ast_mktime() to check for DST, since strptime(3) does not.tilghman1-0/+2
(Closes issue #12374) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@113117 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Safely use the strncat() function.tilghman1-1/+1
(closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@106552 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-14swap location for this..qwell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103684 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-14Document the 'l' option to the CDR() function.qwell1-0/+1
(Thanks voipgate for pointing out the option, and Leif for providing text for it.) Closes issue #11695. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@103683 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-04Missing braces.tilghman1-1/+2
(closes issue #11912) Reported by: dimas Patches: sprintf.patch uploaded by dimas (license 88) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@102214 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Don't try to copy the category from the group if no category exists.file1-1/+2
(closes issue #11724) Reported by: IgorG Patches: group_count.v1.patch uploaded by IgorG (license 20) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97697 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-08If no group has been provided to the GROUP_COUNT dialplan function then use ↵file1-0/+18
the first one specific to the channel. (closes issue #11077) Reported by: m4him git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@97152 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-31Allow the default "0" to be returned if the STAT failstilghman1-1/+1
(Closes issue #11659) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@95470 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-29fix some formatting i accidentally changedrussell1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90147 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29This set of changes is to make some callerID handling thread-safe.russell1-4/+10
The ast_set_callerid() function needed to lock the channel. Also, the handlers for the CALLERID() dialplan function needed to lock the channel when reading or writing callerid values directly on the channel structure. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@90145 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27Default result of STAT should be "0" not "".tilghman1-1/+1
Reported via the -users mailing list, fixed by me. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@89631 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-29Allow some function modules to compile under dev mode.qwell2-2/+2
Issue 11104, patch by andrew. git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87340 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-28Add autoservice to several more functions which might delay in their responses.tilghman4-7/+88
Also, make sure that func_odbc functions have a channel on which to set variables. Reported by russell Fixed by tilghman Closes issue #11099 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87262 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26The addition of autoservice to func_curl additionally made func_curl dependenttilghman1-2/+4
on the existence of a channel, with no real reason. This should make func_curl once again work without a channel. Reported by jmls. Fixed by tilghman. Closes issue #11090 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87120 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-25Backport alternate encoding of newline delimiters from trunk to 1.4, as ↵tilghman1-1/+15
approved by Russell Reported by blitzrage Closes issue #10903 git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@87067 f38db490-d61c-443f-a65b-d21fe96a405b