Commit Graph

27 Commits

Author SHA1 Message Date
Tilghman Lesher 012979b835 Ensure that we can have commas within cdr values.
(closes issue #17001)
 Reported by: snuffy
 Patches: 
       20100412__issue17001.diff.txt uploaded by tilghman (license 14)
 Tested by: snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257065 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-13 16:33:21 +00:00
Sean Bright 9a3d1b76e3 Fix building CDR and CEL SQLite3 modules.
They added a sqlite3_log() function which was conflicting with our function
names.

(closes issue #17017)
Reported by: alephlg


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@252314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-14 17:43:46 +00:00
Russell Bryant a297f2d04e formatting tweaks and constification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249058 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:45:11 +00:00
Russell Bryant 2abbaa5b6d remove include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249012 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-02-26 08:07:27 +00:00
Matthew Nicholson c7358b39b7 Don't close the sqlite database when reloading. Only close the database when unloading.
(closes issue #15953)
Reported by: frawd
Patches:
      sqlite3_rev220097.diff uploaded by frawd (license 610)
Tested by: frawd


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@223136 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-09 17:14:38 +00:00
Russell Bryant 0264eef115 Merge the new Channel Event Logging (CEL) subsystem.
CEL is the new system for logging channel events.  This was inspired after
facing many problems trying to represent what is possible to happen to a call
in Asterisk using CDR records.  For more information on CEL, see the built in
HTML or PDF documentation generated from the files in doc/tex/.

Many thanks to Steve Murphy (murf) and Brian Degenhardt (bmd) for their hard
work developing this code.  Also, thanks to Matt Nicholson (mnicholson) and
Sean Bright (seanbright) for their assistance in the final push to get this
code ready for Asterisk trunk.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@203638 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-26 15:28:53 +00:00
Sean Bright 8d3fb80928 Fix lock usage in cdr_sqlite3_custom to avoid potential crashes during reload.
Pointed out by Russell while working on the CEL branch.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-22 16:09:50 +00:00
Russell Bryant 356c0e2f8c Note a bug in cdr_sqlite3_custom so I don't forget about it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202301 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-21 16:36:55 +00:00
Sean Bright 9a83ed9d93 Use a properly allocated channel for substitution in cdr_sqlite3_custom.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196725 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 13:56:30 +00:00
Kevin P. Fleming e6b2e9a750 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: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Tilghman Lesher 5120334acc Backport 1.6.0 fix to trunk (failsafe if db is not loaded)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-02 17:18:48 +00:00
Tilghman Lesher 31ae1bfa0d If config file is blank, don't load module.
(Closes issue #14563)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@179161 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-27 21:32:13 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Terry Wilson 4f8242904a Begin on a crusade to end trailing whitespace!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:48:58 +00:00
Terry Wilson d66a8cd264 Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-19 19:25:14 +00:00
Sean Bright 2fbd22bbc2 Fix memory leak in cdr_sqlite3_custom.
(closes issue #13304)
Reported by: eliel
Patches:
      sqlite.patch uploaded by eliel (license 64)
      (Slightly modified by me)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-14 18:47:28 +00:00
Terry Wilson b02bc230af 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: https://origsvn.digium.com/svn/asterisk/trunk@109447 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-18 15:43:34 +00:00
Jason Parker 0ea5f428d0 Fix a problem with quoting in sqlite3 cdr module..
Closes issue #11070, patch by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91598 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 21:57:28 +00:00
Luigi Rizzo 7e8835e0d7 remove another set of redundant #include "asterisk/options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89512 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:24:55 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo 9335ace850 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89425 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 19:09:03 +00:00
Luigi Rizzo fdb7f7ba3d 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: https://origsvn.digium.com/svn/asterisk/trunk@89333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16 20:04:58 +00:00
Jason Parker b436362b19 Fix a few potential deadlocks in cdr_sqlite3_custom.
(also rename sample config to .sample)

Closes issue #11208, patch by Laureano.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-09 16:32:01 +00:00
Steve Murphy 63f2f04cf4 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: https://origsvn.digium.com/svn/asterisk/trunk@88166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 22:26:51 +00:00
Jason Parker 0d1abc92fe Don't try to continue loading cdr_sqlite3_custom on a module load failure (such as the config not existing)
Closes issue #10749, patch by seanbright.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-17 21:52:07 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Russell Bryant 5bea998a55 Merge changes from team/russell/sqlite:
* Add new module, cdr_sqlite3_custom which allows logging custom CDRs into a
  SQLite3 database.  (issue #7149, alerios)
* Add new module, res_config_sqlite, which adds realtime database configuration
  support for SQLite version 2.  I decided that this was ok since we didn't have
  any realtime support for version 3.  If someone ports this to version 3, then
  version 2 support can be removed or marked deprecated.
  (issue #7790, rbarun_proformatique)
* Mark cdr_sqlite as deprecated in favor of cdr_sqlite3_custom.

Also, note that there were other modules on the bug tracker that did not make
the cut because they provided some duplicated functionality.  Those are:

* cdr_sqlite3 (issue #6754, moy)
* cdr_sqlite3 (issue #8694, bsd)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-13 21:22:33 +00:00