aboutsummaryrefslogtreecommitdiffstats
path: root/cdr/cdr_pgsql.c
AgeCommit message (Collapse)AuthorFilesLines
2010-12-20If a call was not answered, then the billsec was calculated unusually large.tilghman1-3/+3
Also, due to a copy and paste error, a request for the answer field would have given the start value, instead. (closes issue #18460) Reported by: joscas Patches: 20101215__issue18460.diff.txt uploaded by tilghman (license 14) Tested by: joscas git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@299130 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-24Merged revisions 288636 via svnmerge from tilghman1-0/+8
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288636 | tilghman | 2010-09-23 22:20:24 -0500 (Thu, 23 Sep 2010) | 2 lines Solaris compatibility fixes ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@288637 f38db490-d61c-443f-a65b-d21fe96a405b
2010-09-22Merged revisions 288265-288266 via svnmerge from tilghman1-1/+20
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r288265 | tilghman | 2010-09-22 09:48:04 -0500 (Wed, 22 Sep 2010) | 9 lines Allow the encoding to be set, in case local charset does not agree with database. (closes issue #16940) Reported by: jamicque Patches: 20100827__issue16940.diff.txt uploaded by tilghman (license 14) 20100921__issue16940__1.6.2.diff.txt uploaded by tilghman (license 14) Tested by: jamicque ........ r288266 | tilghman | 2010-09-22 10:04:52 -0500 (Wed, 22 Sep 2010) | 5 lines Document addition of encoding parameter. (issue #16940) Reported by: jamicque ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@288267 f38db490-d61c-443f-a65b-d21fe96a405b
2010-07-12Merged revisions 275626 via svnmerge from lmadsen1-0/+7
https://origsvn.digium.com/svn/asterisk/trunk ........ r275626 | lmadsen | 2010-07-12 10:37:01 -0500 (Mon, 12 Jul 2010) | 11 lines cdr_pgsql does not detect when a table is found. This change adds an ERROR message to let you know when a failure exists to get the columns from the pgsql database, which typically means that the table does not exist. (closes issue #17478) Reported by: kobaz Patches: cdr_pgsql.patch uploaded by kobaz (license 834) Tested by: kobaz, russell, lmadsen ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@275627 f38db490-d61c-443f-a65b-d21fe96a405b
2010-03-20Merged revisions 253540 via svnmerge from russell1-3/+3
https://origsvn.digium.com/svn/asterisk/trunk ........ r253540 | russell | 2010-03-20 07:03:07 -0500 (Sat, 20 Mar 2010) | 2 lines Resolve more compiler warnings on FreeBSD. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@253620 f38db490-d61c-443f-a65b-d21fe96a405b
2009-10-06Merged revisions 222309 via svnmerge from tilghman1-9/+49
https://origsvn.digium.com/svn/asterisk/trunk ........ r222309 | tilghman | 2009-10-06 14:31:39 -0500 (Tue, 06 Oct 2009) | 10 lines Change schema query to involve the use of an optional schema parameter. This change is done in such a way as to allow the driver to continue to function with older databases which don't have these features. (closes issue #16000) Reported by: jamicque Patches: 20091002__issue16000.diff.txt uploaded by tilghman (license 14) 20091002__issue16000__1.6.1.diff.txt uploaded by tilghman (license 14) Tested by: jamicque ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@222311 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211580 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-15When querying for the structure of the CDR table, remove the schema, if ittilghman1-1/+9
exists. (Closes issue #14058) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@164349 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)tilghman1-72/+71
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-20Begin on a crusade to end trailing whitespace!twilson1-8/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@158072 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-19Fix checking for CONFIG_STATUS_FILEINVALID so that modules don't crash upon ↵twilson1-1/+1
trying to parse an invalid config git-svn-id: http://svn.digium.com/svn/asterisk/trunk@157818 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-27Oopstilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@140355 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-24Memory leaktilghman1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@139707 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-24Eliminate open coding of ast_strtilghman1-47/+55
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@139704 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07More from the resolve-shadow-warnings branch. This time the cdr/ directory.seanbright1-7/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136300 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-29Quote column names when inserting CDRs into postgres to avoid conflictsseanbright1-4/+4
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-05-10Ensure that "calldate" is acceptable for a column name.tilghman1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@115596 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-20Minor logging cleanupsseanbright1-29/+29
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114314 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-15Oops, buffer wasn't long enough for querytilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114152 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-11If any field is not null, but has no default, then it must be set or the ↵tilghman1-3/+26
insert will fail. (Closes issue #12285) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114090 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11Whitespace changes onlytilghman1-8/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107551 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25Permit additional CDR columns to be saved in Postgres. Note that thesetilghman1-49/+220
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
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-11-21remove another set of redundant #include "asterisk/options.h"rizzo1-1/+0
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19another bunch of include removals (errno.h and asterisk/logger.h)rizzo1-1/+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 affectrizzo1-5/+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-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-08-16Don't reload a configuration file if nothing has changed.tilghman1-36/+30
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 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-18Merge in ast_strftime branch, which changes timestamps to be accurate to the ↵tilghman1-3/+3
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-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-14Merged revisions 69392 via svnmerge from kpfleming1-1/+1
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.russell1-13/+10
(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 ↵tilghman1-6/+6
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-24Creating new doxygen macro "\extref" to create page that lists oej1-0/+1
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: http://svn.digium.com/svn/asterisk/trunk@56647 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13Merged revisions 47584 via svnmerge from file1-2/+2
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: http://svn.digium.com/svn/asterisk/trunk@47585 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Magical eightball says warnings be gone.file1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43369 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31everything that loads a config that needs a config file to runmogorman1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@41633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21merge new_loader_completion branch, including (at least):kpfleming1-16/+9
- restructured build tree and makefiles to eliminate recursion problems - support for embedded modules - support for static builds - simpler cross-compilation support - simpler module/loader interface (no exported symbols) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-5/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-20remove an unused variable, and default the user to asterisk if not specifiedrussell1-5/+3
in the config file (issue #7153, Mithraen) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@28936 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-20various fixes regarding coding guidelines issuesrussell1-48/+24
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@28935 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-20if a hostname is not specified, connect over a unix socket instead ofrussell1-5/+6
connecting to localhost (issue #7145, Mithraen) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@28897 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵kpfleming1-0/+4
autoconf and menuselect tools for Asterisk! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22267 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-17more module loader related fixeskpfleming1-16/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20963 f38db490-d61c-443f-a65b-d21fe96a405b