dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

349 Commits

Author SHA1 Message Date
seanbright e586239816 Allow cdr_custom to write to multiple files instead of just one.
Up to now, cdr_custom would only accept a single filename/format from
cdr_custom.conf.  This change allows you to specify multiple filename
& format directives.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@195165 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-18 14:54:43 +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 dfc0f2488d Merged revisions 186229 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r186229 | russell | 2009-04-02 20:57:44 -0500 (Thu, 02 Apr 2009) | 21 lines

Fix a memory leak in cdr_radius.

I came across this while doing some testing of my ast_channel_ao2 branch.
After running a test overnight that generated over 5 million calls, Asterisk
had taken up about 1 GB of my system memory.  So, I re-ran the test with
MALLOC_DEBUG turned on.  However, it showed no leaks in Asterisk during the
test, even though Asterisk was still consuming it somehow.

Instead, I turned to valgrind, which when run with --leak-check=full, told
me exactly where the leak came from, which was from allocations inside the
radiusclient-ng library.  This explains why MALLOC_DEBUG did not report it.

After a bit of analysis, I found that we were leaking a little bit of memory
every time a CDR record was passed to cdr_radius.

I don't actually have a radius server set up to receive CDR records.  However,
I always have my development systems compile and install all modules.  In
addition to making sure there are not build errors across modules, always
loading modules helps find bugs like this, too, so it is strongly recommend for
all developers.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@186230 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-03 02:03:48 +00:00
tilghman 6628131bf6 Backport 1.6.0 fix to trunk (failsafe if db is not loaded)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179361 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-02 17:18:48 +00:00
tilghman d532b92cd0 If config file is blank, don't load module.
(Closes issue #14563)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@179161 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-27 21:32:13 +00:00
kpfleming fe480759d9 remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB logic that includes copying the relevant LIB and INCLUDE data from either UnixODBC or iODBC, based on which was found; if both were found, prefer UnixODBC
this stops modules from being linked against both sets of libraries on systems that have both installed



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@168734 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15 20:18:53 +00:00
tilghman 9b133b4c0b When querying for the structure of the CDR table, remove the schema, if it
exists.
(Closes issue #14058)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164349 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15 18:09:58 +00:00
tilghman a41b34a63c Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13 08:36:35 +00:00
kpfleming 246ce365ae incorporates r159808 from branches/1.4:
------------------------------------------------------------------------
r159808 | kpfleming | 2008-11-29 10:58:29 -0600 (Sat, 29 Nov 2008) | 7 lines

update dev-mode compiler flags to match the ones used by default on Ubuntu Intrepid, so all developers will see the same warnings and errors

since this branch already had some printf format attributes, enable checking for them and tag functions that didn't have them

format attributes in a consistent way


------------------------------------------------------------------------

in addition:

move some format attributes from main/utils.c to the header files they belong in, and fix up references to the relevant functions based on new compiler warnings



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@159818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-29 17:57:39 +00:00
twilson 1f5264224f Reloading the config and having no changes still initialized some settings to 0. Initialize settings after doing all of the cfg checks.
(closes issue #13942)
Reported by: davidw
Patches: 
      cdr_diff.txt uploaded by otherwiseguy (license 396)
Tested by: davidw


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158374 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-21 17:08:16 +00:00
twilson 9be5084204 Begin on a crusade to end trailing whitespace!
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158072 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-20 17:48:58 +00:00
twilson f93ebdba02 Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon trying to parse an invalid config
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19 19:25:14 +00:00
tilghman 50a02870ae Allow setting static values in CDRs
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157006 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-14 22:36:30 +00:00
kpfleming a73e71ff1e improve configure script to remember the previous value of each dependency in build_tools/menuselect-deps, so that (once it has been written) menuselect can use this information to warn the user when a previously met dependency is no longer met
along the way, change tags used in configure script, menuselect-deps and code for various dependencies to be consistently named



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154151 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04 15:07:54 +00:00
seanbright fffaf0b978 Keep up with shadow warnings. One day I'll actually enable this in the Makefile.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@147457 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-08 12:15:06 +00:00
mvanbaak 7c30763fbe All ODBC parts can now use either unixodbc or iodbc.
This allows for the ODBC parts to work on OpenBSD as well.

99.99% of the work is done by seanbright (bow, bow) and I actually
did nothing but test and yell at him that it still didn't work :)

Thanks for helping out !


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146925 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06 23:14:33 +00:00
seanbright 1c21496de6 Build under dev-mode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142635 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12 00:49:31 +00:00
tilghman 171dc6a016 Add usegmtime, as per the recent -users list discussion, and also add my
explanation to the file, since that additional text helps people understand
the concept.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@142536 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-11 21:45:07 +00:00
seanbright 706602fc52 Move some duplicated code into a separate function.
Also try to do some wacky stuff in the commit message, like:
a newline \n
a bell \a
a tab \t
a format specification %p

That is all.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140821 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-03 13:48:12 +00:00
tilghman 80ece487c2 Oops
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140355 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-27 23:23:56 +00:00
tilghman 6a7394d3c3 Memory leak
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@139707 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-24 16:26:48 +00:00
tilghman 980a351bb3 Eliminate open coding of ast_str
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@139704 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-24 16:23:15 +00:00
seanbright f0179a2d10 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: http://svn.digium.com/svn/asterisk/trunk@137933 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-14 18:47:28 +00:00
seanbright 1a0b3cb4c4 If we detect that we are no longer connected, try to reconnect a few times
before giving up.  This relies on the timeout settings in the freetds.conf
file and, unfortunately, on a recent version of FreeTDS (0.82 or newer).

I either need to change the current execs to be non-blocking (which I do
not want to do) or we have to force people to run with the latest and
greatest of FreeTDS.  I'm on the fence...


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137780 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-14 15:03:03 +00:00
seanbright cbb6473eba Use the ast_vasprintf macro instead of vasprintf directly.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137403 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-13 14:22:47 +00:00
seanbright ff2f832957 Log the userfield CDR variable like the other CDR backends, assuming the
column is actually there.  If it's not, we still log everything else as
before.

(closes issue #13281)
Reported by: falves11


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137203 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-11 14:25:15 +00:00
tilghman 777979c9d9 Fix runtime symbol error
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136406 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07 15:10:53 +00:00
seanbright 4965ac5e36 More from the resolve-shadow-warnings branch. This time the cdr/ directory.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136300 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07 00:52:23 +00:00
bbryant b2c8abebab Fix magic Revision keywords in hashtab.c and change cdr_radius.c to use
the same keyword as the other files (patch by eliel).

(closes issue #13104)
Reported by: eliel
Patches:
      revision.patch uploaded by eliel (license 64)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@132050 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-18 17:55:41 +00:00
seanbright 745361390b Fix a bug I noticed while doing the previous merge
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@127398 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-02 14:30:09 +00:00
seanbright 0673fac47e Cast a few more strings to char *, so that we can compile cleanly against
FreeTDS 0.60.  Update the docs to reflect that we can now compile and run
against all modern releases of FreeTDS (0.60 through 0.82)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126513 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-30 11:57:42 +00:00
seanbright 8530e0fda8 This was bogus, need to find a better way.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126319 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-29 13:20:01 +00:00
seanbright 76942ba4d3 While we're at it, escape all the columns in our TDS queries as well. Double
quotes seems to be more standard than square brackets (Sybase and SQL Server
both support them).


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126312 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-29 13:11:55 +00:00
seanbright e4e30b0abe Quote column names when inserting CDRs into postgres to avoid conflicts
with reserved words.

(closes issue #12947)
Reported by: panolex


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126274 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-29 12:06:46 +00:00
seanbright 13e31ad1ef Merge in changes from my cdr-tds-conversion branch. This changes the internal
implementation from using the volatile libtds, to using the db-lib front end.
The unintended side effect of this is that we support (at least) versions 0.62
through 0.82 of the FreeTDS distribution without any #ifdef ugliness.

(closes issue #12844)
Reported by: jcollie


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@126226 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-28 21:28:16 +00:00
murf 04118c0c21 This solves a crash in the cdr_tds module on 'stop gracefully', for situations where 'settings' is not set to a pointer
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123446 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-17 20:00:36 +00:00
seanbright d205516f1d Last commit for a bit, minor cleanups and move the lock initialization.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123076 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-16 17:33:10 +00:00
seanbright 1e3cc665ed Convert to use stringfields. Still some more work to do on config load/reload.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123044 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-16 17:14:11 +00:00
seanbright bd4312e1a9 Remove some unused variables
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123041 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-16 16:29:18 +00:00
seanbright a6f0a954b6 Coding guidelines stuff only.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@123009 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-16 15:25:03 +00:00
jpeeler 490730a6b3 Goodbye Zaptel, hello DAHDI. Removes Zaptel driver support with DAHDI. Configuration file and dialplan backwards compatability has been put in place where appropiate. Release announcement to follow.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122234 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-12 17:27:55 +00:00
tilghman f820a7768e Don't unload config on reload, when config has not changed.
(Closes issue #12652)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@116631 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-15 17:58:22 +00:00
tilghman 7fe8fd8510 Ensure that "calldate" is acceptable for a column name.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115596 f38db490-d61c-443f-a65b-d21fe96a405b
2008-05-10 14:19:41 +00:00
seanbright 72c0111028 Minor logging cleanups
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114314 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-20 14:52:07 +00:00
tilghman 67c7e1e162 Oops, buffer wasn't long enough for query
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114152 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-15 20:51:08 +00:00
tilghman 7fcb99764d If any field is not null, but has no default, then it must be set or the insert will fail.
(Closes issue #12285)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114090 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-11 23:26:56 +00:00
tilghman d3c8cbf15a Merged revisions 113874 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r113874 | tilghman | 2008-04-09 13:57:33 -0500 (Wed, 09 Apr 2008) | 4 lines

If the [csv] section does not exist in cdr.conf, then an unload/load sequence
is needed to correct the problem.  Track whether the load succeeded with a
variable, so we can fix this with a simple reload event, instead.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@113875 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-09 19:00:40 +00:00
qwell 624520ee1c Merged revisions 110779 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r110779 | qwell | 2008-03-25 17:51:17 -0500 (Tue, 25 Mar 2008) | 6 lines

Make file access in cdr_custom similar to cdr_csv.

Fixes issue #12268.

Patch borrowed from r82344

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@110780 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-25 22:51:55 +00:00
twilson 9e8ebe6a94 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/trunk@109447 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18 15:43:34 +00:00
tilghman 5b1cec965f Convert prepare_and_execute to direct_execute for speed
(closes issue #11935)
 Reported by: falves11
 Patches: 
       20080208__bug11935.diff.txt uploaded by Corydon76 (license 14)
 Tested by: falves11, Corydon76


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107722 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11 21:10:45 +00:00
tilghman 48fd5486a8 Whitespace changes only
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107551 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11 16:28:03 +00:00
tilghman 712e98b0a0 Convert to use ast_str
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@105411 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-29 23:53:42 +00:00
tilghman e5122f6dca Permit additional CDR columns to be saved in Postgres. Note that these
changes are backward-compatible, so no changes to UPGRADE.txt are
necessary.
(closes issue #9279)
 Reported by: rottenroddy
 Patches: 
       20080125__bug9279.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104101 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25 23:04:20 +00:00
tilghman 507fd79b11 Change the way the new filter feature works, by allowing it to be a column NOT
logged into the database.  This will allow more granularity of a decision
evaluated in the dialplan, then takes effect when posting the CDR.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98987 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-17 00:13:32 +00:00
tilghman 01335bddee Add the "filter" keyword
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98947 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-15 23:52:11 +00:00
tilghman 69d71a14de Port Nick Gorham's timestamp patch to adaptive_odbc, too
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98269 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11 18:35:30 +00:00
tilghman bcc664ccd5 Commit Nick Gorham's suggestion for timestamp fix
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98268 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11 18:30:00 +00:00
tilghman 45f02f8778 Fix problem with timestr going out of scope
(Closes issue #11726, closes issue #11731)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97805 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10 17:38:36 +00:00
rizzo 659205253c remove unnecessary (char *) casts for ast_config_AST_* variables.
There are some left in the .flex files, left to the maintainer...



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93582 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18 09:46:18 +00:00
kpfleming d4e966efcc Merged revisions 93180 via svnmerge from
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-17 07:25:35 +00:00
tilghman 958387bc2e Don't use backslash as an escape character, unless it really is an escape character.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92779 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13 17:46:04 +00:00
rizzo aa85540763 Put into Makefile.moddir_rules the common instructions used to
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-10 03:50:38 +00:00
rizzo b50ce18fe8 normalize subdirs' Makefile by using ASTTOPDIR and not .. to reference
the top level directory.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92022 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-09 21:29:37 +00:00
qwell 21ea51e69a Fix a problem with quoting in sqlite3 cdr module..
Closes issue #11070, patch by seanbright.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91598 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06 21:57:28 +00:00
tilghman ee6901bb3c Merged revisions 90166,90736,90753 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90166 | tilghman | 2007-11-29 13:48:10 -0600 (Thu, 29 Nov 2007) | 3 lines

Properly escape cdr->src and cdr->dst and ensure we use thread-safe escaping
(Fixes AST-2007-026)

........
r90736 | tilghman | 2007-12-03 17:23:55 -0600 (Mon, 03 Dec 2007) | 5 lines

If both dbhost and dbsock were not set, a NULL deref could result
Reported by: xrg
Patch by: tilghman
(Closes issue #11387)

........
r90753 | tilghman | 2007-12-03 17:50:51 -0600 (Mon, 03 Dec 2007) | 5 lines

Solaris requires the inclusion of sys/loadavg.h for getloadavg().
Reported by: snuffy
Patch by: snuffy,tilghman
(Closes issue #11430)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91561 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06 20:52:26 +00:00
tilghman a17700ba80 Change cdr_manager to use a "CDR" level, rather than the (overcrowded) "call" level.
(Closes issue #11015)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-05 16:46:47 +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
tilghman 1688610395 Make trunk build again
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89468 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 23:29:33 +00:00
rizzo 89d8d78652 move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20 23:16:15 +00:00
rizzo 0cc47e4221 another bunch of include removals (errno.h and asterisk/logger.h)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 19:09:03 +00:00
rizzo ba761e2427 more removal of duplicate #include lines
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17 00:02:33 +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
qwell d257a152e5 Fix a few potential deadlocks in cdr_sqlite3_custom.
(also rename sample config to .sample)

Closes issue #11208, patch by Laureano.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89130 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09 16:32:01 +00:00
murf 6d6b520aba Merged revisions 89088 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89088 | murf | 2007-11-07 14:40:28 -0700 (Wed, 07 Nov 2007) | 1 line

In response to 10578, I just ran 1.4 thru valgrind; some of the config leakage I've already fixed, but it doesn't hurt to double check. I found and fixed leaks in res_jabber, cdr_tds, pbx_ael. Nothing major, tho.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89089 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-07 22:09:10 +00:00
file a91d1a2abc Restore building under 64-bit platforms.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88197 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-02 03:09:02 +00:00
tilghman d13f1492f0 Convert cdr_odbc to use res_odbc managed connections
Closes issue #10614


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 22:43:46 +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 8380627624 Fix memory leak
Reported by: eliel
Fixed by: tilghman
Closes issue #11136


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88007 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01 05:44:40 +00:00
tilghman 6bb53e8955 Set enablecdr at the end of re-reading the config file (Closes issue #10852)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84130 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-29 18:21:36 +00:00
tilghman e520c2bf27 Fix cdr_manager, such that if the config file is created past load, it'll
start logging (and conversely, if the config file is destroyed or deactivated,
the logging is disabled).  Reported by Juggie via IRC, fix by me.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21 17:36:17 +00:00
file 43a4eed035 Fix memory leaks in pbx_dundi, cdr_pgsql, and the configuration file parser.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83229 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-20 16:10:57 +00:00
file e346df68a2 Clean up code in cdr_csv. (Are you sensing a theme for me today?)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19 20:06:31 +00:00
qwell cb3876e55f 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: http://svn.digium.com/svn/asterisk/trunk@82712 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17 21:52:07 +00:00
qwell 5a7a7ec10e Merged revisions 82344 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82344 | qwell | 2007-09-13 15:11:40 -0500 (Thu, 13 Sep 2007) | 9 lines

Fix a crash that could occur in cdr_csv when mutliple threads tried to close the same file.

Do we actually need the locking here?  What happens if you open the same file twice, and
 two threads try to write to it at the same time?  Is fputs() going to write out the entire
 line at once?  I suspect that it could be possible for the second fopen to run during the
 first fputs, so the position could be in the middle of the previously written line...

Issue 10347, initial patch by explidous (but I removed all of the paranoia stuff..)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@82345 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-13 20:13:58 +00:00
tilghman dbec3d56c1 Don't reload a configuration file if nothing has changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16 21:09:46 +00:00
russell 2cf27b3a3c Resolve some compiler warnings so that I can build under dev mode
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77770 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-30 15:22:20 +00:00
tilghman 2ebdd5fd1d Some ODBC drivers don't set the CHAR_OCTET_LENGTH field correctly.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-27 23:21:23 +00:00
file a7df13a908 Merged revisions 77540 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77540 | file | 2007-07-27 14:04:08 -0300 (Fri, 27 Jul 2007) | 6 lines

(closes issue #10310)
Reported by: prashant_jois
Patches:
      cdr_pgsql.patch uploaded by prashant (license 114)
Finish the Postgresql connection after the log messages are printed so we don't access invalid memory.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77541 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-27 17:05:18 +00:00
mmichelson a68fc90ea6 Merged revisions 77318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r77318 | mmichelson | 2007-07-26 13:30:29 -0500 (Thu, 26 Jul 2007) | 8 lines

Two consecutive calls to PQfinish could occur, meaning free gets called on the same variable twice.
This patch sets the connection to NULL after calls to PQfinish so that the problem does not occur.
Also in this patch, prashant_jois informed me that it is safe to pass a null pointer to PQfinish, so
I have removed the check for conn's existence from my_unload_module.

(closes issue 10295, reported by junky, patched by me with input from prashant_jois)


........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77319 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26 18:31:28 +00:00
russell 4f3c4dc7f2 Do a massive conversion for using the ast_verb() macro
(closes issue #10277, patches by mvanbaak)

Basically, this changes ...

if (option_verbose > 2)
   ast_verbose(VERBOSE_PREFIX_3, "Something\n");

to ...

ast_verb(3, "Something\n");


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26 15:49:18 +00:00
tilghman 74c2948c22 Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-18 19:47:20 +00:00
murf 6d32e21f95 Merged revisions 70841 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r70841 | murf | 2007-06-21 14:19:36 -0600 (Thu, 21 Jun 2007) | 9 lines

Merged revisions 70804 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r70804 | murf | 2007-06-21 13:13:17 -0600 (Thu, 21 Jun 2007) | 1 line

it was pointed out that the cdr_custom config load could get a lock, and under certain circumstances, would never release it. I also noted that the situation where more than one mapping spec was warned about, but did not ignore further mappings as it had promised. I think I have fixed both situations.
........

................


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70857 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21 20:28:04 +00:00
qwell b46a50d87a Merged revisions 70612 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70612 | qwell | 2007-06-20 18:32:39 -0500 (Wed, 20 Jun 2007) | 4 lines

Fix some potential memory leaks in cdr_pgsql.

Issue 10020, patch by me, with credit to prashant_jois for pointing out the problem.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70613 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20 23:33:49 +00:00
qwell e5bfda136f Merged revisions 70560 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70560 | qwell | 2007-06-20 17:55:21 -0500 (Wed, 20 Jun 2007) | 1 line

Fix a stupid mistake in my last cdr_pgsql race condition fix
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70561 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20 22:55:47 +00:00
qwell 724553d96f Merged revisions 70554 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r70554 | qwell | 2007-06-20 17:31:35 -0500 (Wed, 20 Jun 2007) | 4 lines

Fix a race condition in cdr_pgsql that can occur when reloading the module.

Issue 10022, patch by me, with credit to prashant_jois for finding the bug.

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70555 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-20 22:32:57 +00:00
murf c5045a2326 This enhancement provided via bug 9993, a patch to upgrade cdr_manager to have cdr_custom capabilities. Many thanks to eserra for this contribution
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@70122 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-19 20:38:21 +00:00
russell 36a2e6ea7e Merged revisions 69702 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69702 | russell | 2007-06-18 11:35:02 -0500 (Mon, 18 Jun 2007) | 6 lines

To prevent 92138749238754 more reports of "I have unixodbc installed, but
still can't build *_odbc.so!", check for ltdl directly, instead of just listing
it as another library to include in the unixodbc check in the configure script.
This also makes ltdl show up as a dependency in menuselect so people know what
to go install.  (related to issue #9989, patch by me)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69703 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-18 16:35:51 +00:00
kpfleming 4c5507d166 Merged revisions 69392 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69392 | kpfleming | 2007-06-14 16:50:40 -0500 (Thu, 14 Jun 2007) | 2 lines

use ast_localtime() in every place localtime_r() was being used

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69405 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14 22:09:20 +00:00
russell f042431847 Add a massive set of changes for converting to use the ast_debug() macro.
(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-14 19:39:12 +00:00