dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

42 Commits

Author SHA1 Message Date
kpfleming 230a66da7d Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@196072 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-21 21:13:09 +00:00
tilghman 8fc2c0f724 Merge str_substitution branch.
This branch adds additional methods to dialplan functions, whereby the result
buffers are now dynamic buffers, which can be expanded to the size of any
result.  No longer are variable substitutions limited to 4095 bytes of data.
In addition, the common case of needing buffers much smaller than that will
enable substitution to only take up the amount of memory actually needed.
The existing variable substitution routines are still available, but users
of those API calls should transition to using the dynamic-buffer APIs.
Reviewboard: http://reviewboard.digium.com/r/174/


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@191140 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-29 18:53:01 +00:00
russell 44147470e5 Fix various spelling and grammatical issues in documentation
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153468 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02 02:50:33 +00:00
russell b1f91b97d2 Merge changes from team/group/appdocsxml
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-11-01 21:10:07 +00:00
tilghman d7d5ebe84a For the purpose of making the changed syntax to ExecIf easier to transition,
allow the deprecated syntax (fixed for jmls on -dev).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120904 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-06 17:34:21 +00:00
mvanbaak 54bf9542cd whitespace fixes only.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@103249 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-09 11:27:10 +00:00
qwell a9a2a75c3d Make 'else' argument to ExecIf optional. Clean up the description and usage text a bit.
Closes issue #11564, patch by pnlarsson (with some extra cleanup by me).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@94814 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-26 22:14:21 +00:00
rizzo 150b2c22ef remove another set of redundant #include "asterisk/options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:24:55 +00:00
rizzo 9cf442d7f7 include "logger.h" and errno.h from asterisk.h - usage shows that they
were included almost everywhere.
Remove some of the instances.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 18:52:04 +00:00
rizzo 883346d64a Start untangling header inclusion in a way that does not affect
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-16 20:04:58 +00:00
murf 91879350be Based on a note in asterisk-dev by Brian Capouch, I determined I too 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-12 18:44:36 +00:00
mmichelson 92ac6820ee "show application <foo>" changes for clarity.
(closes issue #11171, reported and patched by blitzrage)

Many thanks!



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89044 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-06 19:04:45 +00:00
murf 47c8ea00b8 This commits the performance mods that give the priority processing engine 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-11-01 22:26:51 +00:00
tilghman 38c3eb5f9d If no '?' is found in the arguments, don't attempt to continue.
Reported by: blitzrage
Fixed by: tilghman
Closes issue #11111


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87724 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-30 22:15:28 +00:00
russell 0d92cdf11e Make this module build on my mac
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@78142 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-05 04:01:28 +00:00
tilghman fd0b69a4e7 Merge the dialplan_aesthetics branch. Most of this patch simply converts 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-23 19:51:41 +00:00
file d17ff1ea42 Applications no longer need to call ast_module_user_add and ast_module_user_remove. This is now taken care of in the pbx_exec function outside of the application.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75200 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16 14:39:29 +00:00
file 9e24ed5ccf It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16 13:35:20 +00:00
file 9e8f015acd Few more code clean ups.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@54534 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-15 02:02:30 +00:00
kpfleming 8b0c007ad9 merge new_loader_completion branch, including (at least):
- restructured build tree and makefiles to eliminate recursion problems
  - support for embedded modules
  - support for static builds
  - simpler cross-compilation support
  - simpler module/loader interface (no exported symbols)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21 02:11:39 +00:00
kpfleming 73c525e6e2 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07 18:54:56 +00:00
russell d99b677f35 remove almost all of the checks of the result from ast_strdupa() or alloca().
As it turns out, all of these checks were useless, because alloca will never
return NULL.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@26451 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-10 13:22:15 +00:00
russell fee1fbb9f2 move ExecIf from app_while.c to app_exec.c (issue #7094, north)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25013 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-05 20:43:16 +00:00
rizzo 3664249356 This rather large commit changes the way modules are loaded.
As partly documented in loader.c and include/asterisk/module.h,
modules are now expected to return all of their methods and flags
into a structure 'mod_data', and are normally loaded with RTLD_NOW
| RTLD_LOCAL, so symbols are resolved immediately and conflicts
should be less likely.  Only in a small number of cases (res_*,
typically) modules are loaded RTLD_GLOBAL, so they can export
symbols.
 
The core of the change is only the two files loader.c and
include/asterisk/module.h, all the rest is simply adaptation of the
existing modules to the new API, a rather mechanical (but believe
me, time and finger-consuming!) process whose detail you can figure
out by svn diff'ing any single module.

Expect some minor compilation issue after this change, please
report it on mantis http://bugs.digium.com/view.php?id=6968
so we collect all the feedback in one place.

I am just sorry that this change missed SVN version number 20000!



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14 14:08:19 +00:00
kpfleming e4880150b1 since the module API is changing, it's a good time to const-ify the description() and key() return values
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-08 22:01:19 +00:00
tilghman 70e60a12ae Bug 6886 - Add application TryExec, which does mostly the same thing, but returns differently
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@17454 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-05 03:53:41 +00:00
rizzo c977f70f81 as discussed with Mark a few weeks ago, the 'newstack' argument
in pbx_exec is always 1 so it can be removed.

This change also takes away ast_exec_extension(), and lets all
switch functions (exists, canmatch, exec, matchmore) all use the same
prototype, which makes the code a bit cleaner.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@16558 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-30 21:29:39 +00:00
russell c72e5e1b38 remove the uses of the deprecated STANDARD_LOCAL_USER
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10241 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-15 20:11:56 +00:00
russell 252fb982f4 on this pass, only remove duplicate log messages
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8403 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21 20:57:06 +00:00
russell b14bdc5a12 revert my pass through the tree to remove checks of the result of ast_strdupa
(revisions 8378 through 8381)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8387 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21 17:50:04 +00:00
russell 3f2c7248c6 remove lots of useless checks of the result of ast_strdupa
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8379 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-21 08:13:12 +00:00
kpfleming 24c1e3c222 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 f38db490-d61c-443f-a65b-d21fe96a405b 2005-11-29 18:24:39 +00:00
russell d3ddc001a2 issue #5605
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6979 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-06 15:09:47 +00:00
russell 2c3b3edc86 Doxygen documentation update from oej (issue #5505)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6847 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-24 20:12:06 +00:00
russell 2c83f05ebb it's a good idea to unregister everything before calling STANDARD_HANGUP_LOCALUSERS
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6828 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-18 22:52:21 +00:00
kpfleming f89c44df03 more license/copyright header updates (thanks Ian!)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6618 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-15 15:44:26 +00:00
kpfleming 8dc28b2439 the last round of file version tags
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5867 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06 22:39:32 +00:00
kpfleming 2f0559dad7 help text cleanups (bug #4072, with mods)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5508 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-27 01:50:53 +00:00
kpfleming 31e8dcf4fe use double-quotes instead of angle-brackets for non-system include files (bug #4058)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5490 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-21 06:02:45 +00:00
markster 19cfa5ca6c Make sure ExecIf stuff returns properly (bug #3864)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5297 f38db490-d61c-443f-a65b-d21fe96a405b
2005-03-29 06:18:58 +00:00
russell 7288b1ced0 update copyright headers for 2005
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4868 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-21 07:06:25 +00:00
citats 5f23ff59a8 Add app_exec (bug 1198
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@2721 f38db490-d61c-443f-a65b-d21fe96a405b
2004-04-20 20:05:14 +00:00