aboutsummaryrefslogtreecommitdiffstats
path: root/cdr
AgeCommit message (Collapse)AuthorFilesLines
2008-01-15Add the "filter" keywordtilghman1-3/+31
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98947 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Port Nick Gorham's timestamp patch to adaptive_odbc, tootilghman1-6/+6
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98269 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-11Commit Nick Gorham's suggestion for timestamp fixtilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@98268 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-10Fix problem with timestr going out of scopetilghman1-20/+19
(Closes issue #11726, closes issue #11731) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@97805 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-18remove unnecessary (char *) casts for ast_config_AST_* variables.rizzo1-1/+1
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-17Merged revisions 93180 via svnmerge from kpfleming1-1/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r93180 | kpfleming | 2007-12-16 22:44:51 -0800 (Sun, 16 Dec 2007) | 23 lines In http://lists.digium.com/pipermail/asterisk-dev/2007-December/031145.html, rizzo brought up some issues related to the way that the metadata required for menuselect and the rest of the build system is extracted from the source files. Since I had a few hours to kill on an airplane today, I decided to improve this situation... so now the system caches the extracted metadata and uses it to build the menuselect 'tree' as much as it can. The result of this is that when a single source file is changed, only the metadata for that file needs to be extracted again, and the rest is used from the cache files. I also reduced the number of forked processes required to do the metadata extraction; it was actually possible to do most of what we needed in the Makefiles themselves without using any shell scripts at all! On my laptop, these changes resulted in an 80% decrease in the time required for the 'menuselect.makeopts' automatic check to occur after editing a single source file. While doing this work I also cleaned up a few minor things in the Makefiles, adding a check for 'awk' to the configure script and changed all remaining places we use 'grep' or 'awk' to use the ones found by the configure script, and changed the 'prep_tarball' script to build the menuselect metadata so that tarballs of Asterisk will include it and won't require the user to wait while it is extracted after unpacking. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@93184 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-13Don't use backslash as an escape character, unless it really is an escape ↵tilghman1-15/+16
character. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92779 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-10Put into Makefile.moddir_rules the common instructions used torizzo1-9/+1
generate loadable and embedded module lists. Individual Makefiles now are a lot simpler, possibly as simple as this: -include $(ASTTOPDIR)/menuselect.makeopts $(ASTTOPDIR)/menuselect.makedeps MODULE_PREFIX=cdr_ all: _all include $(ASTTOPDIR)/Makefile.moddir_rules and also more flexible because in a single directory we can combine various types of modules (app_, cdr_, func_, ... ) by simply listing them in the MODULE_PREFIX variable. The individual Makefiles can also create list of modules to be excluded by listing them in the variablel MODULE_EXCLUDE (see an example in channels/Makefile). With this change it becomes trivial to integrate a directory with locally created/modified sources into the main build. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92082 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-09normalize subdirs' Makefile by using ASTTOPDIR and not .. to referencerizzo1-1/+1
the top level directory. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@92022 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Fix a problem with quoting in sqlite3 cdr module..qwell1-72/+174
Closes issue #11070, patch by seanbright. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91598 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-06Merged revisions 90166,90736,90753 via svnmerge from tilghman1-11/+16
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-05Change cdr_manager to use a "CDR" level, rather than the (overcrowded) ↵tilghman1-1/+1
"call" level. (Closes issue #11015) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@91173 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21remove another set of redundant #include "asterisk/options.h"rizzo7-7/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20Make trunk build againtilghman1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89468 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-20move asterisk/paths.h outside asterisk.h and into those filesrizzo3-0/+3
who really need it. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89466 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo10-14/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89425 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-17more removal of duplicate #include linesrizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89349 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16Start untangling header inclusion in a way that does not affectrizzo10-50/+0
build times - tested, there is no measureable difference before and after this commit. In this change: use asterisk/compat.h to include a small set of system headers: inttypes.h, unistd.h, stddef.h, stddint.h, sys/types.h, stdarg.h, stdlib.h, alloca.h, stdio.h Where available, the inclusion is conditional on HAVE_FOO_H as determined by autoconf. Normally, source files should not include any of the above system headers, and instead use either "asterisk.h" or "asterisk/compat.h" which does it better. For the time being I have left alone second-level directories (main/db1-ast, etc.). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-12Based on a note in asterisk-dev by Brian Capouch, I determined I too ↵murf1-0/+1
agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89186 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-09Fix a few potential deadlocks in cdr_sqlite3_custom.qwell1-0/+3
(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-07Merged revisions 89088 via svnmerge from murf1-2/+4
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-02Restore building under 64-bit platforms.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88197 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01Convert cdr_odbc to use res_odbc managed connectionstilghman1-251/+86
Closes issue #10614 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@88182 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-01This commits the performance mods that give the priority processing engine ↵murf3-3/+1
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-01Fix memory leaktilghman1-0/+10
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-09-29Set enablecdr at the end of re-reading the config file (Closes issue #10852)tilghman1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84130 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21Fix cdr_manager, such that if the config file is created past load, it'lltilghman1-12/+15
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-20Fix memory leaks in pbx_dundi, cdr_pgsql, and the configuration file parser.file1-7/+23
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83229 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-19Clean up code in cdr_csv. (Are you sensing a theme for me today?)file1-48/+50
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-17Don't try to continue loading cdr_sqlite3_custom on a module load failure ↵qwell1-1/+2
(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-13Merged revisions 82344 via svnmerge from qwell1-10/+18
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-08-16Don't reload a configuration file if nothing has changed.tilghman9-202/+210
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-30Resolve some compiler warnings so that I can build under dev moderussell1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77770 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-27Some ODBC drivers don't set the CHAR_OCTET_LENGTH field correctly.tilghman1-0/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77603 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-27Merged revisions 77540 via svnmerge from file1-2/+2
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-26Merged revisions 77318 via svnmerge from mmichelson1-2/+3
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-26Do a massive conversion for using the ast_verb() macrorussell2-60/+31
(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-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman7-61/+36
microsecond, instead of only to the second git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75706 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-21Merged revisions 70841 via svnmerge from murf1-4/+6
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-20Merged revisions 70612 via svnmerge from qwell1-1/+4
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-20Merged revisions 70560 via svnmerge from qwell1-1/+1
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-20Merged revisions 70554 via svnmerge from qwell1-1/+5
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-19This enhancement provided via bug 9993, a patch to upgrade cdr_manager to ↵murf1-14/+50
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-18Merged revisions 69702 via svnmerge from russell1-0/+1
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-14Merged revisions 69392 via svnmerge from kpfleming7-13/+13
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-14Add a massive set of changes for converting to use the ast_debug() macro.russell5-35/+21
(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-12Merged revisions 69016 via svnmerge from russell1-6/+7
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: http://svn.digium.com/svn/asterisk/trunk@69017 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman5-32/+32
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-24Oops, should have released this when we were done with it.tilghman1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65748 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-22Fix for 64-bit platformtilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@65313 f38db490-d61c-443f-a65b-d21fe96a405b