Commit Graph

404 Commits

Author SHA1 Message Date
Sean Bright b543887664 Use a properly allocated channel for substitution in cdr_manager.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196622 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 12:14:14 +00:00
Sean Bright 1d28f5acd4 Fix errors in cdr_custom that cause reference errors when non-CDR variable
substitution is done.

cdr_custom was creating a ast_channel struct directly and passing it into the
core for variable substition.  This was fine as long as the format string
contained only calls to the CDR() function.  Doing something like ${EPOCH} on
the other hand tried to lock the channel, which would fail and throw an error
because the passed channel hadn't been allocated as an ao2 object.  So now we
create the dummy channel with ast_channel_alloc, and everything works as
expected.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196520 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-23 15:16:59 +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
Sean Bright c890725398 Remove some unused code.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 17:08:25 +00:00
Sean Bright dd0cd47630 Const-ify a string, fix a log message, and use the correct signature for the
load_module function.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@195210 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 15:55:53 +00:00
Sean Bright f223598207 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: https://origsvn.digium.com/svn/asterisk/trunk@195165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 14:54:43 +00:00
Tilghman Lesher a866a75900 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: https://origsvn.digium.com/svn/asterisk/trunk@191140 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-29 18:53:01 +00:00
Russell Bryant fde695bb7f 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: https://origsvn.digium.com/svn/asterisk/trunk@186230 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-03 02:03:48 +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
Kevin P. Fleming 9a7efae8fd 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: https://origsvn.digium.com/svn/asterisk/trunk@168734 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15 20:18:53 +00:00
Tilghman Lesher b584784f85 When querying for the structure of the CDR table, remove the schema, if it
exists.
(Closes issue #14058)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@164349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-15 18:09:58 +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
Kevin P. Fleming 887e28d7aa 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: https://origsvn.digium.com/svn/asterisk/trunk@159818 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-29 17:57:39 +00:00
Terry Wilson 3a4177f52e 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: https://origsvn.digium.com/svn/asterisk/trunk@158374 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-21 17:08:16 +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
Tilghman Lesher 03b1a5a384 Allow setting static values in CDRs
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@157006 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-14 22:36:30 +00:00
Kevin P. Fleming 448562af93 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: https://origsvn.digium.com/svn/asterisk/trunk@154151 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04 15:07:54 +00:00
Sean Bright ceee55ea63 Keep up with shadow warnings. One day I'll actually enable this in the Makefile.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-08 12:15:06 +00:00
Michiel van Baak 4560279c69 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: https://origsvn.digium.com/svn/asterisk/trunk@146925 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06 23:14:33 +00:00
Sean Bright e189fb406f Build under dev-mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 00:49:31 +00:00
Tilghman Lesher 3a67cc8016 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: https://origsvn.digium.com/svn/asterisk/trunk@142536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-11 21:45:07 +00:00
Sean Bright a8a0ecb509 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: https://origsvn.digium.com/svn/asterisk/trunk@140821 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-03 13:48:12 +00:00
Tilghman Lesher b95a4f4680 Oops
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@140355 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-27 23:23:56 +00:00
Tilghman Lesher 8be98abf79 Memory leak
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139707 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-24 16:26:48 +00:00
Tilghman Lesher a88af95df4 Eliminate open coding of ast_str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@139704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-24 16:23:15 +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
Sean Bright 297ebf779f 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: https://origsvn.digium.com/svn/asterisk/trunk@137780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-14 15:03:03 +00:00
Sean Bright c2faa7bfda Use the ast_vasprintf macro instead of vasprintf directly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137403 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-13 14:22:47 +00:00
Sean Bright 9c7099faae 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: https://origsvn.digium.com/svn/asterisk/trunk@137203 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-11 14:25:15 +00:00
Tilghman Lesher 8397209316 Fix runtime symbol error
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136406 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 15:10:53 +00:00
Sean Bright 778b3d88a7 More from the resolve-shadow-warnings branch. This time the cdr/ directory.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@136300 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-07 00:52:23 +00:00
Brett Bryant 86e5bb8b7d 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: https://origsvn.digium.com/svn/asterisk/trunk@132050 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-18 17:55:41 +00:00
Sean Bright 097ac98034 Fix a bug I noticed while doing the previous merge
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@127398 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-02 14:30:09 +00:00
Sean Bright dd0c0f3d38 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: https://origsvn.digium.com/svn/asterisk/trunk@126513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-30 11:57:42 +00:00
Sean Bright a61f8794e3 This was bogus, need to find a better way.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29 13:20:01 +00:00
Sean Bright e41a7c3d51 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: https://origsvn.digium.com/svn/asterisk/trunk@126312 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29 13:11:55 +00:00
Sean Bright 044a7b945f Quote column names when inserting CDRs into postgres to avoid conflicts
with reserved words.

(closes issue #12947)
Reported by: panolex


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@126274 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-29 12:06:46 +00:00
Sean Bright 19830f3359 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: https://origsvn.digium.com/svn/asterisk/trunk@126226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-28 21:28:16 +00:00
Steve Murphy c23e5fea96 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: https://origsvn.digium.com/svn/asterisk/trunk@123446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-17 20:00:36 +00:00
Sean Bright f0b9647b09 Last commit for a bit, minor cleanups and move the lock initialization.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 17:33:10 +00:00
Sean Bright 4ee3510f10 Convert to use stringfields. Still some more work to do on config load/reload.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123044 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 17:14:11 +00:00
Sean Bright 852c514e25 Remove some unused variables
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123041 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 16:29:18 +00:00
Sean Bright 8b1ed7aa5b Coding guidelines stuff only.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@123009 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-16 15:25:03 +00:00
Jeff Peeler ef3b214728 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: https://origsvn.digium.com/svn/asterisk/trunk@122234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-12 17:27:55 +00:00
Tilghman Lesher 1207e9207e Don't unload config on reload, when config has not changed.
(Closes issue #12652)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@116631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-15 17:58:22 +00:00
Tilghman Lesher 0c08b7727d Ensure that "calldate" is acceptable for a column name.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-10 14:19:41 +00:00
Sean Bright 87973ccea2 Minor logging cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-20 14:52:07 +00:00
Tilghman Lesher 369ccdef5e Oops, buffer wasn't long enough for query
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114152 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-15 20:51:08 +00:00
Tilghman Lesher 7c26320110 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: https://origsvn.digium.com/svn/asterisk/trunk@114090 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-11 23:26:56 +00:00
Tilghman Lesher ded5ec5b5d 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: https://origsvn.digium.com/svn/asterisk/trunk@113875 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-09 19:00:40 +00:00
Jason Parker 1958abd90e 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: https://origsvn.digium.com/svn/asterisk/trunk@110780 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-25 22:51:55 +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
Tilghman Lesher cafd900dc8 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: https://origsvn.digium.com/svn/asterisk/trunk@107722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 21:10:45 +00:00
Tilghman Lesher 408228bfb8 Whitespace changes only
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@107551 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-11 16:28:03 +00:00
Tilghman Lesher fbb78d988d Convert to use ast_str
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@105411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-29 23:53:42 +00:00
Tilghman Lesher f274f7bcaa 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: https://origsvn.digium.com/svn/asterisk/trunk@104101 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-25 23:04:20 +00:00
Tilghman Lesher ac3c95e370 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: https://origsvn.digium.com/svn/asterisk/trunk@98987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-17 00:13:32 +00:00
Tilghman Lesher 799246dae3 Add the "filter" keyword
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-15 23:52:11 +00:00
Tilghman Lesher ada37a921b Port Nick Gorham's timestamp patch to adaptive_odbc, too
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98269 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 18:35:30 +00:00
Tilghman Lesher ed3007e7b3 Commit Nick Gorham's suggestion for timestamp fix
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-11 18:30:00 +00:00
Tilghman Lesher 222917317d Fix problem with timestr going out of scope
(Closes issue #11726, closes issue #11731)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@97805 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-10 17:38:36 +00:00
Luigi Rizzo fd88390af7 remove unnecessary (char *) casts for ast_config_AST_* variables.
There are some left in the .flex files, left to the maintainer...



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@93582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-18 09:46:18 +00:00
Kevin P. Fleming 100ef27af9 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: https://origsvn.digium.com/svn/asterisk/trunk@93184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-17 07:25:35 +00:00
Tilghman Lesher 5d23b05a92 Don't use backslash as an escape character, unless it really is an escape character.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-13 17:46:04 +00:00
Luigi Rizzo 5490889153 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: https://origsvn.digium.com/svn/asterisk/trunk@92082 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-10 03:50:38 +00:00
Luigi Rizzo d652be0930 normalize subdirs' Makefile by using ASTTOPDIR and not .. to reference
the top level directory.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@92022 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-09 21:29:37 +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
Tilghman Lesher 700cd10397 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: https://origsvn.digium.com/svn/asterisk/trunk@91561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-06 20:52:26 +00:00
Tilghman Lesher ce2f670228 Change cdr_manager to use a "CDR" level, rather than the (overcrowded) "call" level.
(Closes issue #11015)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 16:46:47 +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
Tilghman Lesher cbfc6dcbea Make trunk build again
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89468 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:29:33 +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 d82a631f9c more removal of duplicate #include lines
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89349 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-17 00:02:33 +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
Steve Murphy 98429d37b2 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: https://origsvn.digium.com/svn/asterisk/trunk@89186 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-12 18:44:36 +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 a87efea3c4 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: https://origsvn.digium.com/svn/asterisk/trunk@89089 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-07 22:09:10 +00:00
Joshua Colp 16e33c3791 Restore building under 64-bit platforms.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88197 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-02 03:09:02 +00:00
Tilghman Lesher 4650a56d23 Convert cdr_odbc to use res_odbc managed connections
Closes issue #10614


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88182 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 22:43:46 +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
Tilghman Lesher c96c01cfd1 Fix memory leak
Reported by: eliel
Fixed by: tilghman
Closes issue #11136


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88007 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-01 05:44:40 +00:00
Tilghman Lesher 9691f51d73 Set enablecdr at the end of re-reading the config file (Closes issue #10852)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84130 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-29 18:21:36 +00:00
Tilghman Lesher 2fc1f89c30 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: https://origsvn.digium.com/svn/asterisk/trunk@83466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-21 17:36:17 +00:00
Joshua Colp 6489076887 Fix memory leaks in pbx_dundi, cdr_pgsql, and the configuration file parser.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83229 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-20 16:10:57 +00:00
Joshua Colp 2f0dba3010 Clean up code in cdr_csv. (Are you sensing a theme for me today?)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@83183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-19 20:06:31 +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
Jason Parker 28fbbde310 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: https://origsvn.digium.com/svn/asterisk/trunk@82345 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-13 20:13:58 +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 9d959a040e Resolve some compiler warnings so that I can build under dev mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-30 15:22:20 +00:00
Tilghman Lesher 7f570a8b3d Some ODBC drivers don't set the CHAR_OCTET_LENGTH field correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 23:21:23 +00:00
Joshua Colp 52099657d5 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: https://origsvn.digium.com/svn/asterisk/trunk@77541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27 17:05:18 +00:00
Mark Michelson 625410df63 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: https://origsvn.digium.com/svn/asterisk/trunk@77319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 18:31:28 +00:00
Russell Bryant f8483a0d04 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: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Tilghman Lesher 81bc1d7af5 Merge in ast_strftime branch, which changes timestamps to be accurate to the microsecond, instead of only to the second
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75706 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-18 19:47:20 +00:00
Steve Murphy 8aaa93e624 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: https://origsvn.digium.com/svn/asterisk/trunk@70857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-21 20:28:04 +00:00
Jason Parker cf5666ca7a 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: https://origsvn.digium.com/svn/asterisk/trunk@70613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 23:33:49 +00:00
Jason Parker 21c8795c1d 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: https://origsvn.digium.com/svn/asterisk/trunk@70561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 22:55:47 +00:00
Jason Parker a5d03568e5 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: https://origsvn.digium.com/svn/asterisk/trunk@70555 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-20 22:32:57 +00:00
Steve Murphy 9c2197dc9e 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: https://origsvn.digium.com/svn/asterisk/trunk@70122 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-19 20:38:21 +00:00
Russell Bryant 43658278ff 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: https://origsvn.digium.com/svn/asterisk/trunk@69703 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18 16:35:51 +00:00
Kevin P. Fleming 5fdba27ea2 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: https://origsvn.digium.com/svn/asterisk/trunk@69405 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 22:09:20 +00:00
Russell Bryant 055d82cbce 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: https://origsvn.digium.com/svn/asterisk/trunk@69327 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-14 19:39:12 +00:00
Russell Bryant febc05b1f7 Merged revisions 69016 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r69016 | russell | 2007-06-12 14:40:17 -0500 (Tue, 12 Jun 2007) | 4 lines

Fix a memory leak pointed out by prashant_jois in #asterisk-bugs.  PQclear() was
not called on the result structure after doing a PQexec().  Also, fix up some
formatting in passing.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@69017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-12 19:40:41 +00:00
Tilghman Lesher 9d05ff8ed5 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-06 21:20:11 +00:00
Tilghman Lesher 2263fd907e Oops, should have released this when we were done with it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-24 03:27:54 +00:00
Tilghman Lesher cff6586d8d Fix for 64-bit platform
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65313 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-22 02:41:55 +00:00
Tilghman Lesher de27bce777 Comment a few more things, and remove an unnecessary db connection check
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65283 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-21 02:05:23 +00:00
Tilghman Lesher 6fbadb4325 Merge cdr_adaptive_odbc from developer branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@65169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-18 20:21:11 +00:00
Steve Murphy fe7068a51b Merged revisions 62689 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62689 | murf | 2007-05-02 11:10:50 -0600 (Wed, 02 May 2007) | 1 line

a)In chan_zap, set the clid, src fields in channel_alloc call. b)in the channel_alloc func, set the cid_num and name fields from the arglist[blush]. c) don't update the channel app & app data fields if you are in the 'h' extension. d)the load_module func in cdr_radius needs to return DECLINE, SUCCESS.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62690 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-02 17:24:03 +00:00
Tilghman Lesher 711c77fc08 Merged revisions 59302 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r59302 | tilghman | 2007-03-29 11:07:05 -0500 (Thu, 29 Mar 2007) | 11 lines

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

........
r59301 | tilghman | 2007-03-29 11:04:46 -0500 (Thu, 29 Mar 2007) | 3 lines

Issue 9415 - No point to getting a diagnostic field if we aren't doing anything with the information.
(Plus, it tends to crash the Postgres ODBC driver.)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59303 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-29 16:08:17 +00:00
Olle Johansson fb0ed25369 Correct reference to Radius library
THanks Philippe - Greetings from Lisboa, Portugal


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-14 17:01:37 +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
Olle Johansson bc01e39174 Creating new doxygen macro "\extref" to create page that lists
external libraries and URLs to these. Please help me add these
references.

We might want to create a similar macro "\linuxpackage" to list
the needed Linux packages in popular distributions.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@56647 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-24 19:27:50 +00:00
Jason Parker fe4208e4ee Merged revisions 50346 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r50346 | qwell | 2007-01-10 10:45:36 -0600 (Wed, 10 Jan 2007) | 4 lines

Reverse some logic in cdr_manager, which made it fail to load if the config file existed.

Issue 8777

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@50347 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-10 16:47:23 +00:00
Steve Murphy 7b338004bf a quick fix to app_sms.c to get rid of cursed compiler warnings so I can compile under --enable-dev-mode
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48767 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-21 19:44:20 +00:00
Joshua Colp 380d0e9070 Merged revisions 47584 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r47584 | file | 2006-11-13 16:28:57 -0500 (Mon, 13 Nov 2006) | 10 lines

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

........
r47583 | file | 2006-11-13 16:26:36 -0500 (Mon, 13 Nov 2006) | 2 lines

Initialize global pointers for connection and result to NULL. (issue #8356 reported by james)

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13 21:32:13 +00:00
Kevin P. Fleming 749029de38 Merged revisions 46200 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46200 | kpfleming | 2006-10-25 09:32:08 -0500 (Wed, 25 Oct 2006) | 2 lines

apparently developers are still not aware that they should be use ast_copy_string instead of strncpy... fix up many more users, and fix some bugs in the process

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46201 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-25 14:44:50 +00:00
Joshua Colp 68ccfe6e5e Merged revisions 45928 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r45928 | file | 2006-10-22 20:27:39 -0400 (Sun, 22 Oct 2006) | 10 lines

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

........
r45927 | file | 2006-10-22 20:25:28 -0400 (Sun, 22 Oct 2006) | 2 lines

Don't leak memory mmmk?

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@45929 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-23 00:33:20 +00:00
Matt O'Gorman ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Tilghman Lesher 993adde868 Merged revisions 43410 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r43410 | tilghman | 2006-09-21 11:31:59 -0500 (Thu, 21 Sep 2006) | 10 lines

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

........
r43409 | tilghman | 2006-09-21 11:18:19 -0500 (Thu, 21 Sep 2006) | 2 lines

TDS 0.64 updates

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43411 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-21 16:38:16 +00:00
Tilghman Lesher 8e81e20658 One last forgotten constified file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:14:33 +00:00
Russell Bryant cb268c0228 resolve compiler warnings from constification
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43370 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:08:32 +00:00
Joshua Colp e8b820e743 Magical eightball says warnings be gone.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:03:37 +00:00
Tilghman Lesher 70af28270d Constify the result of a config retrieval function, to avoid mutilation (issue 7983).
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 20:40:39 +00:00
Russell Bryant eb3db2fc15 fix some breakage, MOG DID IT!!!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41651 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:50:55 +00:00
Matt O'Gorman 05a695af72 everything that loads a config that needs a config file to run
now reports AST_MODULE_LOAD_DECLINE when loading if config file
is not there, also fixed an error in res_config_pgsql where it 
had a non static function when it should.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00:20 +00:00
Kevin P. Fleming d12f54f90b GNU make already knows how to quietly ignore non-existent files in 'include' directives
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@41209 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-26 23:58:47 +00:00
Kevin P. Fleming 0a27d8bfe5 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00
Kevin P. Fleming 000ba592b2 more Makefile cleanup and consistency stuff
don't reuse LIBS variable from top-level Makefile (oops)
build Asterisk binary after subdirs (preparing for embedded modules)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37661 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-15 19:59:35 +00:00
Kevin P. Fleming 748431f7b6 move rules file to prepare for generic rules file
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37222 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-06 21:04:28 +00:00
Kevin P. Fleming dbf099cdb8 update dependency information to match new names for dependencies
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37085 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-05 20:12:29 +00:00
Kevin P. Fleming 98a465fc09 move FreeTDS version check into configure script
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@36255 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-29 07:50:01 +00:00
Kevin P. Fleming a579371f43 use new (separate) dependencies file from menuselect
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35895 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-25 08:50:14 +00:00
Kevin P. Fleming e61d3d91f3 The Eurostar Commit! (it's amazing how much work you can get done on a 150 minute train ride from Paris to London <G>)
support the new location for zaptel.h and tonezone.h
use the dependency information output by menuselect to build Makefile rules for each module for header files and libraries
combine the common rules into a top-level Makefile.rules file
remove all (now) unnecessary stuff from subdir Makefiles
change translator API so that the newpvt() callback returns an int instead of a pointer (it no longer allocates memory)
alphabetize --with-<foo> options in configure script
enhance Net-SNMP support in configure script to provide a --with-netsnmp option
fix support for --with-pq so that if pg-config is not found when --with-pq is specified, an error will be generated
add 'optional package' usage to modules now that menuselect can output it
allow res_snmp to build by default, since the new loader changes coming soon will solve the function naming problem (and users can disable it via menuselect anyway)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-24 19:43:31 +00:00
Russell Bryant 48ae9f0d4f - convert the 'uninstall' target to use separate targets to process each
subdirectory instead of a for loop
- remove the FORCE target from the main Makefile and add the couple places
  I used it to the .PHONY target.  .PHONY does the same thing and is a built-in
  more efficient way of doing it.
- add a bunch more targets to .PHONY ...


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35503 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:38:13 +00:00
Russell Bryant 55e8a60363 - specify that 'depend' is a .PHONY target
- use separate targets instead of a for loop for doing 'make depend' for
  each sub directory


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35501 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 15:08:08 +00:00
Russell Bryant 9db0520ff9 - specify that 'all' is a .PHONY target
- add a copyright header to the build_tools Makefile
- remove 'depend' from the 'all' target in agi/ and utils/ since it is handled
  by the main Makefile already


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 14:09:18 +00:00
Russell Bryant c399a06450 add the 'clean', 'clean-depend', and 'dist-clean' targets as .PHONY targets
since they are targets that do not have resulting files and are never listed
as prerequisites to real targets.  Using .PHONY in this manner improves make
performance by never having to check for resulting files.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@35415 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-22 11:27:03 +00:00
Russell Bryant 9f2a6516cf don't blow up in the sub Makefiles if menuselect.makeopts is not present. This
is valid in some cases, such as "make clean".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34738 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-19 00:14:16 +00:00
Russell Bryant b6147a21b9 remove "depend" from the "all" targets in sub Makefiles. The main Makefile
already calls "make depend" for each of the subdirectories


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@34497 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-16 16:54:00 +00:00
Kevin P. Fleming 8d88bf549d there is no reason to define our own 'maximum path length' when the POSIX headers already define one for us
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@33351 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-09 20:40:10 +00:00
Kevin P. Fleming 472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Russell Bryant 503f99e2e8 remove the need to have to re-run make after a default menuselect.makeopts
file is generated.  This allows a fresh checkout of asterisk to be built
and installed with the standard "./configure && make && make install".


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 16:03:31 +00:00
Kevin P. Fleming e856010714 use module names, not file names, in menuselect
work around XML parsing bug in menuselect for default sounds package


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32407 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-05 20:46:27 +00:00
Russell Bryant a8c1284633 change a warning message to a debug message
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@31226 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-01 00:15:25 +00:00
Russell Bryant b0ee67ebdc remove a bunch of duplicated log messages. There is a warning that gets
logged when this function returns an error


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@30746 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-30 11:23:48 +00:00
Russell Bryant 1fcc86d905 Add support for logging CDR recrods to a radius server (issue #6639, phsultan)
- with contributions from miconda, jcollie, and sb
 - branch maintained by oej
Thanks everyone!


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@29094 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-20 22:30:05 +00:00