aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_strings.c
AgeCommit message (Collapse)AuthorFilesLines
2010-10-28Fix infinite loop in FILTER(). jpeeler1-3/+3
Specifically when you're using characters above \x7f or invalid character escapes (e.g. \xgg). (closes issue #18060) Reported by: wdoekes Patches: issue18060_func_strings_filter_infinite_loop.patch uploaded by wdoekes (license 717) Tested by: wdoekes git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@293158 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-24Solaris won't printf a NULL.tilghman1-2/+2
(closes issue #18041) Reported by: asgaroth git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@288712 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-10LISTFILTER was doubling delimiters on output.tilghman1-1/+1
(closes issue #16900) Reported by: bluecrow76 Patches: asterisk-1.6.2.4-func_strings.diff uploaded by bluecrow76 (license 270) git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@251678 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10Merged revisions 246204 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r246204 | tilghman | 2010-02-10 15:24:10 -0600 (Wed, 10 Feb 2010) | 2 lines Fussy compiler on another machine... ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@246207 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10Merged revisions 246200 via svnmerge from tilghman1-6/+7
https://origsvn.digium.com/svn/asterisk/trunk ........ r246200 | tilghman | 2010-02-10 15:19:35 -0600 (Wed, 10 Feb 2010) | 2 lines Fix weird issue with unit tests on optimized build - turned out to be a signing issue. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@246203 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10Merged revisions 246022 via svnmerge from tilghman1-0/+8
https://origsvn.digium.com/svn/asterisk/trunk ........ r246022 | tilghman | 2010-02-10 09:36:57 -0600 (Wed, 10 Feb 2010) | 2 lines Enable warnings on atypical conditions for the FILTER function (suggested by mmichelson on the -dev list). ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@246025 f38db490-d61c-443f-a65b-d21fe96a405b
2010-02-10Merged revisions 245945 via svnmerge from tilghman1-6/+14
https://origsvn.digium.com/svn/asterisk/trunk ................ r245945 | tilghman | 2010-02-10 08:06:12 -0600 (Wed, 10 Feb 2010) | 9 lines Merged revisions 245944 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r245944 | tilghman | 2010-02-10 07:37:13 -0600 (Wed, 10 Feb 2010) | 2 lines Include examples of FILTER usage in extension patterns where a "." may be a risk. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@245948 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-07Fix merge error.seanbright1-73/+0
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@222547 f38db490-d61c-443f-a65b-d21fe96a405b
2009-09-30Merged revisions 221368 via svnmerge from mnick1-3/+129
https://origsvn.digium.com/svn/asterisk/trunk ................ r221368 | mnick | 2009-09-30 14:42:36 -0500 (Wed, 30 Sep 2009) | 23 lines Merged revisions 221153,221157,221303 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r221153 | mnick | 2009-09-30 10:37:39 -0500 (Wed, 30 Sep 2009) | 2 lines check bounds - prevents for buffer overflow ........ r221157 | mnick | 2009-09-30 10:41:46 -0500 (Wed, 30 Sep 2009) | 8 lines added a new dialplan function 'CSV_QUOTE' and changed the cdr_custom.sample.conf (closes issue #15471) Reported by: dkerr Patches: csv_quote_14.txt uploaded by mnick (license ) Tested by: mnick ........ r221303 | mnick | 2009-09-30 14:02:00 -0500 (Wed, 30 Sep 2009) | 2 lines changed the prototype definition of csv_quote ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@221371 f38db490-d61c-443f-a65b-d21fe96a405b
2009-07-21Merged revisions 207946 via svnmerge from tilghman1-0/+6
https://origsvn.digium.com/svn/asterisk/trunk ................ r207946 | tilghman | 2009-07-21 17:45:32 -0500 (Tue, 21 Jul 2009) | 15 lines Merged revisions 207945 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r207945 | tilghman | 2009-07-21 17:38:54 -0500 (Tue, 21 Jul 2009) | 8 lines Force an error if a blank is passed to QUOTE (because the documentation 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.6.2@207949 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-31Merged revisions 198470 via svnmerge from tilghman1-1/+6
https://origsvn.digium.com/svn/asterisk/trunk ........ r198470 | tilghman | 2009-05-31 12:52:28 -0500 (Sun, 31 May 2009) | 2 lines Fix documentation for FIELDQTY. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@198471 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-31Don't increment the loop, now that incrementing is taken care of by thetilghman1-1/+1
decoder function. (closes issue #14363) Reported by: andrew53 Patches: func_strings_filter.patch uploaded by andrew53 (license 519) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@172706 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)tilghman1-8/+5
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-11Merged revisions 163253 via svnmerge from russell1-16/+0
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r163253 | russell | 2008-12-11 15:46:29 -0600 (Thu, 11 Dec 2008) | 8 lines Fix some observed slowdowns in dialplan processing. 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/trunk@163254 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29we can now build with -Wformat=2, which found a couple of real bugskpfleming1-170/+0
because SPRINTF() use non-literal format strings (which cannot be checked), move it into its own module so the rest of func_strings can benefit from format string checking git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159774 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-05Add LISTFILTER dialplan function, along with supporting documentation. Seetilghman1-0/+116
documentation for more information on how to use it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154915 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02Fix various spelling and grammatical issues in documentationrussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153468 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01Merge changes from team/group/appdocsxmlrussell1-93/+239
This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-26Merged revisions 152059 via svnmerge from seanbright1-4/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r152059 | seanbright | 2008-10-26 16:23:36 -0400 (Sun, 26 Oct 2008) | 7 lines Since passing \0 as the second argument to strchr is valid (and will 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/trunk@152060 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-01Add schedule extensions to app_meetme. In addition, the reporter found atilghman1-9/+4
problem within strptime(3), which we are correcting here with ast_strptime(). (closes issue #11040) Reported by: DEA Patches: 20080910__bug11040.diff.txt uploaded by Corydon76 (license 14) Tested by: DEA git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145649 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-15Merged revisions 138023 via svnmerge from tilghman1-4/+15
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r138023 | tilghman | 2008-08-15 09:51:12 -0500 (Fri, 15 Aug 2008) | 8 lines Additional check for more string specifiers than arguments. (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/trunk@138024 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07Continue merging in changes from resolve-shadow-warnings. funcs/ this time.seanbright1-21/+21
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136302 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-07Merged revisions 113117 via svnmerge from tilghman1-1/+4
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r113117 | tilghman | 2008-04-07 12:51:49 -0500 (Mon, 07 Apr 2008) | 3 lines Force ast_mktime() to check for DST, since strptime(3) does not. (Closes issue #12374) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@113172 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Merged revisions 106552 via svnmerge from tilghman1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines Safely use the strncat() function. (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/trunk@106553 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-04Merged revisions 102214 via svnmerge from tilghman1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r102214 | tilghman | 2008-02-03 23:10:02 -0600 (Sun, 03 Feb 2008) | 6 lines Missing braces. (closes issue #11912) Reported by: dimas Patches: sprintf.patch uploaded by dimas (license 88) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@102238 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-09Added a new module, res_phoneprov, which allows auto-provisioning of phonestwilson1-0/+39
based on configuration templates that use Asterisk dialplan function and variable substitution. It should be possible to create phone profiles and templates that work for the majority of phones provisioned over http. It is currently only intended to provision a single user account per phone. An example profile and set of templates for Polycom phones is provided. NOTE: Polycom firmware is not included, but should be placed in AST_DATA_DIR/phoneprov/configs to match up with the included templates. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97634 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02Change instances of AST_NONSTANDARD_APP_ARGS(foo, bar, ',') to ↵mmichelson1-1/+1
AST_STANDARD_APP_ARGS(foo, bar) (closes issue #11668, reported and patched by mvanbaak) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95994 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16remove a bunch of duplicate includesrizzo1-1/+0
Reproduce with grep -r #include . | grep -v .svn | grep -v Binary | sort | uniq -c | sort -nr git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89348 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo1-4/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08improve linked-list macros in two ways:kpfleming1-1/+1
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89106 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01This commits the performance mods that give the priority processing engine ↵murf1-3/+1
in the pbx, a 25-30% speed boost. The two updates used, are, first, to merge the ast_exists_extension() and the ast_spawn_extension() where they are called sequentially in a loop in the code, into a slightly upgraded version of ast_spawn_extension(), with a few extra args; and, second, I modified the substitute_variables_helper_full, so it zeroes out the byte after the evaluated string instead of demanding you pre-zero the buffer; I also went thru the code and removed the code that zeroed this buffer before every call to the substitute_variables_helper_full. The first fix provides about a 9% speedup, and the second the rest. These figures come from the 'PIPS' benchmark I describe in blogs, conf. reports, etc. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88166 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-28Merged revisions 87262 via svnmerge from tilghman1-1/+20
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87262 | tilghman | 2007-10-28 08:46:55 -0500 (Sun, 28 Oct 2007) | 7 lines Add autoservice to several more functions which might delay in their responses. 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/trunk@87263 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26Use the same delimited character as the FILTER function in FIELDQTY and CUT.tilghman1-80/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87103 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-15Document my changes from Fridaytilghman1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85633 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-12Enable ranges, hexadecimal, octal, and special backslashed characters for ↵tilghman1-2/+103
the FILTER function git-svn-id: http://svn.digium.com/svn/asterisk/trunk@85522 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-12Merged revisions 82285 via svnmerge from tilghman1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r82285 | tilghman | 2007-09-12 15:12:06 -0500 (Wed, 12 Sep 2007) | 4 lines Working on issue #10531 exposed a rather nasty 64-bit issue on ast_mktime, so we updated the localtime.c file from source. Next we'll have to write ast_strptime to match. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82290 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-23Merge the dialplan_aesthetics branch. Most of this patch simply converts ↵tilghman1-22/+14
applications using old methods of parsing arguments to using the standard macros. However, the big change is that the really old way of specifying application and arguments separated by a comma will no longer work (e.g. NoOp,foo|bar). Instead, the way that has been recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76703 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman1-10/+19
microsecond, instead of only to the second git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14Add a massive set of changes for converting to use the ast_debug() macro.russell1-6/+3
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-1/+1
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-29Merged revisions 66538 via svnmerge from tilghman1-2/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r66538 | tilghman | 2007-05-29 16:56:07 -0500 (Tue, 29 May 2007) | 10 lines Merged revisions 66537 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r66537 | tilghman | 2007-05-29 16:49:35 -0500 (Tue, 29 May 2007) | 2 lines If the value of a variable passed to FIELDQTY is blank, then FIELDQTY should return 0, not 1. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66540 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-19Merged revisions 59049 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59049 | tilghman | 2007-03-19 17:29:56 -0500 (Mon, 19 Mar 2007) | 2 lines Oops, this should have been a %d all along ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59050 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-14Merged revisions 58880 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r58880 | tilghman | 2007-03-13 20:47:08 -0500 (Tue, 13 Mar 2007) | 3 lines Issue 9162 - pbx_substitute_variables_helper assumes the buffer is initialized to all zeroes. This fixes a case where it wasn't. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@58881 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-01Merged revisions 53093 via svnmerge from russell1-3/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r53093 | russell | 2007-02-01 15:24:52 -0600 (Thu, 01 Feb 2007) | 2 lines Fix the FIELDQTY function to not crash. (reported by blitzrage and Corydon on IRC) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53094 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-01Merged revisions 53075 via svnmerge from tilghman1-5/+5
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53075 | tilghman | 2007-02-01 14:09:52 -0600 (Thu, 01 Feb 2007) | 10 lines Merged revisions 53074 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53074 | tilghman | 2007-02-01 14:07:35 -0600 (Thu, 01 Feb 2007) | 2 lines Bug 8965 - Allow FIELDQTY to work with both variables and dialplan functions ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53076 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-01Merged revisions 53070 via svnmerge from tilghman1-3/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ................ r53070 | tilghman | 2007-02-01 13:21:20 -0600 (Thu, 01 Feb 2007) | 10 lines Merged revisions 53069 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r53069 | tilghman | 2007-02-01 13:13:53 -0600 (Thu, 01 Feb 2007) | 2 lines No wonder FIELDQTY doesn't work with functions... the documentation in pbx.c was wrong ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53071 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-24Doxygen updateoej1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51920 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-18Merged revisions 51265 via svnmerge from qwell1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51265 | qwell | 2007-01-18 16:50:23 -0600 (Thu, 18 Jan 2007) | 4 lines Add some more checks for option_debug before ast_log(LOG_DEBUG, ...) calls. Issue 8832, patch(es) by tgrman ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51266 f38db490-d61c-443f-a65b-d21fe96a405b