summaryrefslogtreecommitdiff
path: root/res/res_odbc.c
AgeCommit message (Collapse)Author
2008-12-18Fix reference counts of the class and add an assertion to the end.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165541 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17Fix a refcount leak in res_odbcMark Michelson
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05Janitor, use ARRAY_LEN() when possible.Eliel C. Sardanons
(closes issue #13990) Reported by: eliel Patches: array_len.diff uploaded by eliel (license 64) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-04improve configure script to remember the previous value of each dependency ↵Kevin P. Fleming
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-10-08Keep up with shadow warnings. One day I'll actually enable this in the ↵Sean Bright
Makefile. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@147457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-06All ODBC parts can now use either unixodbc or iodbc.Michiel van Baak
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-02Merged revisions 145751 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r145751 | tilghman | 2008-10-02 10:13:21 -0500 (Thu, 02 Oct 2008) | 3 lines Some sanity checks that may have led to prior crashes, found by codefreeze-lap (murf) on IRC. Also some cleanup of incorrectly-used constants. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@145752 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingTilghman Lesher
when a file is invalid from when a file is missing. This is most important when we have two configuration files. Consider the following example: Old system: sip.conf users.conf Old result New result ======== ========== ========== ========== Missing Missing SIP doesn't load SIP doesn't load Missing OK SIP doesn't load SIP doesn't load Missing Invalid SIP doesn't load SIP doesn't load OK Missing SIP loads SIP loads OK OK SIP loads SIP loads OK Invalid SIP loads incompletely SIP doesn't load Invalid Missing SIP doesn't load SIP doesn't load Invalid OK SIP doesn't load SIP doesn't load Invalid Invalid SIP doesn't load SIP doesn't load So in the case when users.conf doesn't load because there's a typo that disrupts the syntax, we may only partially load users, instead of failing with an error, which may cause some calls not to get processed. Worse yet, the old system would do this with no indication that anything was even wrong. (closes issue #10690) Reported by: dtyoo Patches: 20080716__bug10690.diff.txt uploaded by Corydon76 (license 14) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-11Merged revisions 137138 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r137138 | tilghman | 2008-08-10 19:20:38 -0500 (Sun, 10 Aug 2008) | 5 lines Deallocate database connection handle on disconnect, as we allocate another one on connect. (closes issue #13271) Reported by: dveiga ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137150 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10All of the res/ stuff (other than res_jabber) from the RSW branch.Sean Bright
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137028 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11a small change to make things compileSteve Murphy
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130296 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11Don't copy on NULL.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130234 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-07-11Add some debug code and add a missing releaseTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@130232 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-10Move the table cache routines to res_odbc, so they can be used from otherTilghman Lesher
places (app_voicemail, for example). (Related to bug #11678) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@121683 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-23Protect the object from changing while the 'odbc show' CLI command is runningTilghman Lesher
(Closes issue #12704) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@118129 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20Increase limit of unshared connections from 1023 to 4.2 billion.Tilghman Lesher
(Related to issue #12677) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117264 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-20Revert part of previous fix, and heavily comment the logic for objectTilghman Lesher
destruction, for future users. (Closes issue #12677) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117262 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-19Remove a premature mutex destroy (the destruction callback will end up ↵Joshua Colp
destroying it) and use a callback to purge remaining classes. (closes issue #12677) Reported by: falves11 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@117133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-07Don't free the object on destroy, as astobj2 takes care of that for youTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115525 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-05-05Merge refcounting of res_odbcTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@115337 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-01Clarify the pooling functionality by changing the config file keywordTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@101824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-23Merged revisions 99775 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99775 | tilghman | 2008-01-22 22:20:15 -0600 (Tue, 22 Jan 2008) | 2 lines Oops, should have checked for a NULL obj, here, too ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99776 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-21Merged revisions 99341 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r99341 | tilghman | 2008-01-21 12:11:07 -0600 (Mon, 21 Jan 2008) | 8 lines Permit the user to specify number of seconds that a connection may remain idle, which fixes a crash on reconnect with the MyODBC driver. (closes issue #11798) Reported by: Corydon76 Patches: 20080119__res_odbc__idlecheck.diff.txt uploaded by Corydon76 (license 14) Tested by: mvanbaak ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99350 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-18Permit username and password to be NULL (which enables pass-through from the ↵Tilghman Lesher
layer above). Reported by: lurcher Patch by: tilghman (Closes issue #11739) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@99017 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-12Merged revisions 98467 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r98467 | tilghman | 2008-01-11 18:05:08 -0600 (Fri, 11 Jan 2008) | 4 lines Add a connection timeout attribute, as that was what was intended with the login timeout, but ODBC divides it up into 2 different timeouts. (Closes issue #11745) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98487 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05Use ast_free() instead of free().Russell Bryant
(closes issue #11309) Reported by: Laureano Patches: res_odbc.c.patch uploaded by Laureano (license 265) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91131 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-25Merged revisions 89559 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r89559 | tilghman | 2007-11-25 11:17:10 -0600 (Sun, 25 Nov 2007) | 14 lines We previously attempted to use the ESCAPE clause to set the escape delimiter to a backslash. Unfortunately, this does not universally work on all databases, since on databases which natively use the backslash as a delimiter, the backslash itself needs to be delimited, but on other databases that have no delimiter, backslashing the backslash causes an error. So the only solution that I can come up with is to create an option in res_odbc that explicitly specifies whether or not backslash is a native delimiter. If it is, we use it natively; if not, we use the ESCAPE clause to make it one. Reported by: elguero Patch by: tilghman (Closes issue #11364) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89561 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21remove a bunch of useless #include "options.h"Luigi Rizzo
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19include "logger.h" and errno.h from asterisk.h - usage shows that theyLuigi Rizzo
were included almost everywhere. Remove some of the instances. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89424 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-16Start untangling header inclusion in a way that does not affectLuigi Rizzo
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-14One more typo in config.c; and missed conversions due to the constifying of ↵Tilghman Lesher
ast_variable_new parameters git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89270 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-08improve linked-list macros in two ways:Kevin P. Fleming
- the *_CURRENT macros no longer need the list head pointer argument - add AST_LIST_MOVE_CURRENT to encapsulate the remove/add operation when moving entries between lists git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89106 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-05Merged revisions 88539 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r88539 | tilghman | 2007-11-05 10:20:13 -0600 (Mon, 05 Nov 2007) | 4 lines Don't check used pooled connections for connection status, as it will cause issues for prepared queries. Reported by: Nick Gorham (via -dev list) Patch by: tilghman ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@88540 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-22Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former ↵Jason Parker
didn't make much sense git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86820 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-19Convert NEW_CLI to AST_CLI.Jason Parker
Closes issue #11039, as suggested by seanbright. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@86536 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-18(issue #10724)Jason Parker
Reported by: eliel Patches: res_features.c.patch uploaded by eliel (license 64) res_agi.c.patch uploaded by seanbright (license 71) res_musiconhold.c.patch uploaded by seanbright (license 71) pbx.c.patch uploaded by moy (license 222) logger.c.patch uploaded by moy (license 222) frame.c.patch uploaded by moy (license 222) manager.c.patch uploaded by moy (license 222) http.c.patch uploaded by moy (license 222) dnsmgr.c.patch uploaded by moy (license 222) res_realtime.c.patch uploaded by eliel (license 64) res_odbc.c.patch uploaded by seanbright (license 71) res_jabber.c.patch uploaded by eliel (license 64) chan_local.c.patch uploaded by eliel (license 64) chan_agent.c.patch uploaded by eliel (license 64) chan_alsa.c.patch uploaded by eliel (license 64) chan_features.c.patch uploaded by eliel (license 64) chan_sip.c.patch uploaded by eliel (license 64) RollUp.1.patch (includes all of the above patches) uploaded by seanbright (license 71) Convert many CLI commands to the NEW_CLI format. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-14Add a direct execute method to res_odbc (closes issue #10722)Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@82393 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16Don't reload a configuration file if nothing has changed.Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-13Only use the sanitysql if it's not zero-lenTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79333 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-11Merged revisions 79142 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79142 | tilghman | 2007-08-11 00:23:04 -0500 (Sat, 11 Aug 2007) | 2 lines Ensure the connection gets marked as used at allocation time (closes issue #10429, report and fix by mnicholson) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07Merged revisions 78437 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r78437 | tilghman | 2007-08-07 14:34:25 -0500 (Tue, 07 Aug 2007) | 2 lines Don't free the environment handle when the connection fails, because other connections might be depending upon it ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78442 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-27Merged revisions 77571 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r77571 | tilghman | 2007-07-27 13:15:58 -0500 (Fri, 27 Jul 2007) | 2 lines Missing newline ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-18Merged revisions 69702 via svnmerge from Russell Bryant
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-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵Tilghman Lesher
guidelines changes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@67864 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-30Issue 9477 - Improve menuselect labelsTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-28Merged revisions 59289 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r59289 | tilghman | 2007-03-27 22:38:09 -0500 (Tue, 27 Mar 2007) | 2 lines Another crash that I thought we had fixed already - Issue 9396 ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@59290 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-03-08Merged revisions 58479 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r58479 | tilghman | 2007-03-08 15:33:03 -0600 (Thu, 08 Mar 2007) | 2 lines Fix segfault (Issue 9236) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@58480 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-30Merged revisions 52808 via svnmerge from Paul Cadach
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r52808 | pcadach | 2007-01-30 00:34:26 -0800 (Втр, 30 Янв 2007) | 1 line Don't play with free()'d pointers ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@52819 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06Constify a bunch of usage strings for CLI commands.Russell Bryant
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-13Feature: allow the sanity SQL to be customized per connection class (Issue ↵Tilghman Lesher
6453) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@47530 65c4cc65-6c06-0410-ace0-fbb531ad65f3