aboutsummaryrefslogtreecommitdiffstats
path: root/cdr/cdr_pgsql.c
AgeCommit message (Collapse)AuthorFilesLines
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
2006-04-08since the module API is changing, it's a good time to const-ify the ↵kpfleming1-2/+2
description() and key() return values git-svn-id: http://svn.digium.com/svn/asterisk/trunk@18552 f38db490-d61c-443f-a65b-d21fe96a405b
2006-03-01Merged revisions 11503 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.2 ........ r11503 | tilghman | 2006-03-01 11:41:52 -0600 (Wed, 01 Mar 2006) | 2 lines Bug 6615 - Fix 64bit conversion errors by using a long int ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@11504 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-24- Adding whitespace that I found unused outside oej1-11/+16
- Adding "if (option_debug)" before outputting to DEBUG channel git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8524 f38db490-d61c-443f-a65b-d21fe96a405b
2006-01-24Declaring conn and result static to avoid collission with realtime driver ↵oej1-3/+3
(issue 6336, pressureman) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@8523 f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-29git-svn-id: http://svn.digium.com/svn/asterisk/trunk@7221 ↵kpfleming1-0/+0
f38db490-d61c-443f-a65b-d21fe96a405b
2005-11-06issue #5605russell1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6979 f38db490-d61c-443f-a65b-d21fe96a405b
2005-10-26more doxygenification (issue #5513)russell1-2/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6852 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-15more license/copyright header updates (thanks Ian!)kpfleming1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6618 f38db490-d61c-443f-a65b-d21fe96a405b
2005-09-14update MANY more files with proper copyright/license info (thanks Ian!)kpfleming1-4/+14
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6596 f38db490-d61c-443f-a65b-d21fe96a405b
2005-07-11remove complex malloc-avoidance (bug #4601)kpfleming1-104/+50
remove resetting of variables during unload that will only be freed or set to known values on reload git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6085 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06more file version tagskpfleming1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5866 f38db490-d61c-443f-a65b-d21fe96a405b
2005-06-06another round of version tag updates, along with 'show version files' ↵kpfleming1-8/+12
pattern filtering git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5865 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-29don't use '%i' at all, since we have no current use cases that need non ↵kpfleming1-1/+1
base-10 parsing (bug #4110) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5533 f38db490-d61c-443f-a65b-d21fe96a405b
2005-04-21use double-quotes instead of angle-brackets for non-system include files ↵kpfleming1-7/+7
(bug #4058) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5490 f38db490-d61c-443f-a65b-d21fe96a405b
2005-02-19Make cdr_pgsql gracefully handle restarts (bug #3628)markster1-1/+14
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@5056 f38db490-d61c-443f-a65b-d21fe96a405b
2005-01-25Merge config updates (bug #3406)markster1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4889 f38db490-d61c-443f-a65b-d21fe96a405b
2004-12-12Fix PGSQL CDR issue (bug #3028)markster1-2/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4440 f38db490-d61c-443f-a65b-d21fe96a405b
2004-12-09Make table for PGSQL CDR's configurable (bug #2951)markster1-5/+33
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4412 f38db490-d61c-443f-a65b-d21fe96a405b
2004-12-01Fix missing ast_destroy's in PGSQL (bug #2944)markster1-10/+15
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4365 f38db490-d61c-443f-a65b-d21fe96a405b
2004-07-28Only Call PQfinish if conn isn't NULL (bug #2162)markster1-1/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3528 f38db490-d61c-443f-a65b-d21fe96a405b
2004-07-14Merge remaining audit patch (save dlfcn.c)markster1-10/+13
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3436 f38db490-d61c-443f-a65b-d21fe96a405b
2004-07-09Fixes from bkw_. Formatting in app_db.c and handle start right in cdr_pgsql.ccitats1-6/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@3415 f38db490-d61c-443f-a65b-d21fe96a405b