aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
AgeCommit message (Collapse)AuthorFilesLines
2008-04-07Merged revisions 113172 via svnmerge from tilghman1-1/+4
https://origsvn.digium.com/svn/asterisk/trunk ................ r113172 | tilghman | 2008-04-07 14:06:46 -0500 (Mon, 07 Apr 2008) | 11 lines Merged revisions 113117 via svnmerge from 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/branches/1.6.0@113173 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Merged revisions 109447 via svnmerge from russell1-2/+2
https://origsvn.digium.com/svn/asterisk/trunk ........ r109447 | twilson | 2008-03-18 10:43:34 -0500 (Tue, 18 Mar 2008) | 3 lines Go through and fix a bunch of places where character strings were being interpreted as format strings. Most of these changes are solely to make compiling with -Wsecurity and -Wformat=2 happy, and were not actual problems, per se. I also added format attributes to any printf wrapper functions I found that didn't have them. -Wsecurity and -Wmissing-format-attribute added to --enable-dev-mode. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109459 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Merged revisions 106553 via svnmerge from tilghman3-5/+5
https://origsvn.digium.com/svn/asterisk/trunk ................ r106553 | tilghman | 2008-03-07 00:54:47 -0600 (Fri, 07 Mar 2008) | 14 lines Merged revisions 106552 via svnmerge from 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/branches/1.6.0@106554 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-06Merged revisions 105899 via svnmerge from russell1-1/+6
https://origsvn.digium.com/svn/asterisk/trunk ........ r105899 | russell | 2008-03-04 18:45:39 -0600 (Tue, 04 Mar 2008) | 3 lines Fix the SHARED() read callback to properly unlock the channel. This function could not have worked, as it left the channel locked in all cases. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@106309 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-04Simplify a trivial snprintf() with ast_copy_string()russell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105595 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-01Add a "devstate change" CLI command to control custom device states. Also,russell1-1/+73
do some additional code cleanup and improvement in passing. (closes issue #12106) Reported by: nizon Patches: devstate-patch.txt uploaded by nizon (license 415) -- Updated to trunk, and tab completion added by me git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105461 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26fix this modulerussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104251 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26Use the readhandle for reads (closes issue #12069)tilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104125 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25Shared space for variables (instead of letting other channels muck with your ↵tilghman1-1/+163
own) (closes issue #11943) Reported by: ramonpeek Patches: 20080208__bug11943__2.diff.txt uploaded by Corydon76 (license 14) Tested by: jmls git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104098 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-18Context tracing for channelstilghman1-0/+24
(closes issue #11268) Reported by: moy Patches: chantrace-datastored-encapsulated-rev94934.patch uploaded by moy (license 222) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103754 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-14Merged revisions 103683 via svnmerge from qwell1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r103683 | qwell | 2008-02-14 13:51:10 -0600 (Thu, 14 Feb 2008) | 5 lines Document the 'l' option to the CDR() function. (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/trunk@103685 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-08Merge changes from team/mvanbaak/cli-command-auditrussell1-2/+47
(closes issue #8925) About a year ago, as Leif Madsen and Jim van Meggelen were going over the CLI commands in Asterisk 1.4 for the next version of their book, they documented a lot of inconsistencies. This set of changes addresses all of these issues and has been reviewed by Leif. While this does introduce even more changes to the CLI command structure, it makes everything consistent, which is the most important thing. Thanks to all that helped with this one! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103171 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-06Add REALTIME_STORE and REALTIME_DESTROY dialplan functions provided by sergee.twilson1-3/+137
I just added the ability to set multiple fields at once after discussions with Tilghman and Russell. Currently limited to 30 fields. (closes issue #11887) Reported by: sergee Patches: rt-func-store-destroy-multivalue.diff uploaded by otherwiseguy (license 396) Tested by: sergee, otherwiseguy git-svn-id: http://svn.digium.com/svn/asterisk/trunk@102700 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-31Add missing braces.file1-1/+2
(closes issue #11886) Reported by: sergee Patches: func_realtime_fix-r101392.diff uploaded by sergee (license 138) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@101393 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Convert func_odbc to use SQLExecDirect for speedtilghman1-5/+5
(closes issue #10723) Reported by: mnicholson Patches: func-odbc-direct-execute1.diff uploaded by mnicholson (license 96) Tested by: Corydon76, mnicholson, falves11 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99018 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Reset default CUT delimiter back to '-'tilghman1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99015 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Merged revisions 97697 via svnmerge from file1-1/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97697 | file | 2008-01-10 11:07:12 -0400 (Thu, 10 Jan 2008) | 6 lines Don't try to copy the category from the group if no category exists. (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/trunk@97698 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-08Merged revisions 97152 via svnmerge from file1-0/+18
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r97152 | file | 2008-01-08 15:53:52 -0400 (Tue, 08 Jan 2008) | 4 lines If no group has been provided to the GROUP_COUNT dialplan function then use the first one specific to the channel. (closes issue #11077) Reported by: m4him ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97153 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-05Now that the version.h file was getting properly regenerated every time the svnrussell1-15/+11
revision changed, every module that used the version was getting rebuilt after every svn update. This severly annoyed me pretty quickly, so I have improved the situation. Now, instead of generating version.h, main/version.c is generated. version.c includes the version information, as well as a couple of API calls for modules to retrieve the version. So now, only version.c will get rebuilt, and the main asterisk binary relinked, which is must faster than rebuilding http.c, manager.c, asterisk.c, relinking the asterisk binary, chan_sip.c, func_version.c, res_agi ... The only minor change in behavior here is that the version information reported by chan_sip, for example, is the version of the Asterisk core, and not necessarily the Asterisk version that the chan_sip module came from. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96717 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02Change instances of AST_NONSTANDARD_APP_ARGS(foo, bar, ',') to ↵mmichelson2-3/+3
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
2008-01-01implement "configure" checks for libiconv, and add therizzo1-0/+1
iconv dependency for func_iconv. This fixes some build issues on CYGWIN and FreeBSD and probably other platforms where libiconv is not there by default git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95624 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-31Merged revisions 95470 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r95470 | tilghman | 2007-12-31 14:27:26 -0600 (Mon, 31 Dec 2007) | 3 lines Allow the default "0" to be returned if the STAT fails (Closes issue #11659) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95490 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-27This function checks more than just contexts...oej1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94827 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26Add a new dialplan function, DIALPLAN_EXISTS(), which allows you to check forrussell1-0/+106
the existence of a dialplan target. (closes issue #11579) Reported by: irroot Patches: func_dialplan2.c uploaded by irroot (license 52) -- Additional changes by me. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94799 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-17Merged revisions 93180 via svnmerge from kpfleming1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines 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: http://svn.digium.com/svn/asterisk/trunk@93184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14I needed to increment the numbers used on the VERBOSITY_ATLEAST calls by 1.mmichelson1-1/+1
Thanks to kpfleming for pointing this out. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93065 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Changed VERBOSITY_LEVEL to VERBOSITY_ATLEAST to be more accurate.mmichelson1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93063 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14After reading Russell's e-mail to the dev list stating that checking ↵mmichelson1-1/+1
option_verbose is not equivalent to the check done by ast_verb, I wrote a macro, VERBOSITY_LEVEL, which does this check. I did a quick look in the source and used this macro in some places where option_verbose was used. I also converted some verbose messages in logger.c to use ast_verb instead of ast_verbose. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93042 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-14Reintroduce an optimization that was lost when converting trunk to use ast_verb.mmichelson1-2/+4
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92976 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10Put into Makefile.moddir_rules the common instructions used torizzo1-9/+1
generate loadable and embedded module lists. Individual Makefiles now are a lot simpler, possibly as simple as this: -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps MODULE_PREFIX=cdr_ all: _all include $(ASTTOPDIR)/Makefile.moddir_rules and also more flexible because in a single directory we can combine various types of modules (app_, cdr_, func_, ... ) by simply listing them in the MODULE_PREFIX variable. The individual Makefiles can also create list of modules to be excluded by listing them in the variablel MODULE_EXCLUDE (see an example in channels/Makefile). With this change it becomes trivial to integrate a directory with locally created/modified sources into the main build. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92082 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-09normalize subdirs' Makefile by using ASTTOPDIR and not .. to referencerizzo1-1/+1
the top level directory. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92022 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29Merged revisions 90145 via svnmerge from russell1-2/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r90145 | russell | 2007-11-28 18:20:34 -0600 (Wed, 28 Nov 2007) | 5 lines This set of changes is to make some callerID handling thread-safe. 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/trunk@90146 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27Merged revisions 89631 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89631 | tilghman | 2007-11-27 09:38:03 -0600 (Tue, 27 Nov 2007) | 3 lines Default result of STAT should be "0" not "". Reported via the -users mailing list, fixed by me. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89632 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-22remove some useless includesrizzo5-19/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89521 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo15-15/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19Make the SYSINFO documentation reflect which options were compiled inrussell1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89439 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19remove unnecessary headersrizzo1-7/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89431 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19remove some unnecessary includes.rizzo2-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89430 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo27-30/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19Adding SYSINFO() dialplan function for retrieval of system informationmmichelson1-0/+122
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89421 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17more removal of duplicate #include linesrizzo2-2/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16remove a bunch of duplicate includesrizzo4-4/+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 affectrizzo32-138/+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-12Based on a note in asterisk-dev by Brian Capouch, I determined I too ↵murf1-1/+1
agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89186 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Make func_env build again.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89121 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-08Add the FILE() dialplan function and deprecate ReadFile.tilghman1-0/+61
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89114 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 ↵murf4-7/+3
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