summaryrefslogtreecommitdiff
path: root/res/res_odbc.c
AgeCommit message (Collapse)Author
2012-10-14Doxygen Updates - Title updateAndrew Latham
Update and extend the configuration_file group and enable linking to the resource. Update title that was left behind many years ago. (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@375003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-10-01Doxygen CleanupAndrew Latham
Start adding configuration file linking and pages. Add module loading doxygen block. Breaking up commits to keep it easy to track (issue ASTERISK-20259) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@374165 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-18Ensure that all ast_datastore_info structures are 'const'.Kevin P. Fleming
While addressing a bug, I came across a instance of 'struct ast_datastore_info' that was not declared 'const'. Since the API already expects them to be 'const', this patch changes the declarations of all existing instances that were not already declared that way. ........ Merged revisions 370183 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 370184 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370187 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11Fix coverity UNUSED_VALUE findings in core support level filesKinsey Moore
Most of these were just saving returned values without using them and in some cases the variable being saved to could be removed as well. (issue ASTERISK-19672) ........ Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10Resolve FORWARD_NULL static analysis warningsKinsey Moore
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20, 22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111, and 115. Finding numbers 26, 33, and 29 were already resolved. Those skipped were either extended/deprecated or in areas of code that shouldn't be disturbed. (Closes issue ASTERISK-19650) ........ Merged revisions 366167 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 366168 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-17Avoid cppcheck warnings; removing unused vars and a bit of cleanup.Walter Doekes
Patch by: junky Review: https://reviewboard.asterisk.org/r/1743/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@362307 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Converts locking for odbc containers from ast_mutex_lock to ao2_locks.Jonathan Rose
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@357051 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-27Remove possible segfaults from res_odbc by adding locks around usage of odbc ↵Jonathan Rose
handle (closes issue ASTERISK-19011) Reported by: Walter Doekes Patches: issueA19011_combine_read_and_write_locks_WORK_IN_PROGRESS.patch uploaded by Walter Doekes (license 5674) review: https://reviewboard.asterisk.org/r/1719/ review: https://reviewboard.asterisk.org/r/1622/ ........ Merged revisions 356917 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 356961 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356962 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-27Audit of ao2_iterator_init() usage for v1.8.Richard Mudgett
Fixes numerous reference leaks and missing ao2_iterator_destroy() calls as a result. Review: https://reviewboard.asterisk.org/r/1697/ ........ Merged revisions 352955 from http://svn.asterisk.org/svn/asterisk/branches/1.8 ........ Merged revisions 352956 from http://svn.asterisk.org/svn/asterisk/branches/10 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14Merged revisions 328247 via svnmerge from Leif Madsen
https://origsvn.digium.com/svn/asterisk/branches/1.10 ................ r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines Merged revisions 328209 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines Introduce <support_level> tags in MODULEINFO. This change introduces MODULEINFO into many modules in Asterisk in order to show the community support level for those modules. This is used by changes committed to menuselect by Russell Bryant recently (r917 in menuselect). More information about the support level types and what they mean is available on the wiki at https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-22Merged revisions 320445 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r320445 | tilghman | 2011-05-22 18:34:57 -0500 (Sun, 22 May 2011) | 15 lines Merged revisions 320444 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r320444 | tilghman | 2011-05-22 18:25:51 -0500 (Sun, 22 May 2011) | 8 lines Don't crash when the connection fails. (closes issue #19250) Reported by: seadweller Patches: 20110514__issue19250.diff.txt uploaded by tilghman (license 14) Tested by: seadweller, sum ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@320446 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03Merged revisions 316215 via svnmerge from David Vossel
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r316215 | dvossel | 2011-05-03 13:49:48 -0500 (Tue, 03 May 2011) | 9 lines Fixes a random crash (NULL reference) in res_odbc.c. (closes issue #19180) Reported by: pruiz Patches: tmp.diff uploaded by pruiz (license 1152) Tested by: pruiz, seanbright ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316216 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-14Merged revisions 307793 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r307793 | tilghman | 2011-02-14 14:16:55 -0600 (Mon, 14 Feb 2011) | 15 lines Merged revisions 307792 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ........ r307792 | tilghman | 2011-02-14 14:10:28 -0600 (Mon, 14 Feb 2011) | 8 lines Increment usage count at first reference, to avoid a race condition with many threads creating connections all at once. (issue #18156) Reported by: asgaroth Patches: 20110214__issue18156.diff.txt uploaded by tilghman (license 14) Tested by: tilghman ........ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@307795 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-04Replace ast_log(LOG_DEBUG, ...) with ast_debug()Paul Belanger
(closes issue #18556) Reported by: kkm Review: https://reviewboard.asterisk.org/r/1071/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@306258 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-05Merged revisions 300623 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ................ r300623 | tilghman | 2011-01-05 12:56:12 -0600 (Wed, 05 Jan 2011) | 24 lines Merged revisions 300622 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.6.2 ................ r300622 | tilghman | 2011-01-05 12:54:58 -0600 (Wed, 05 Jan 2011) | 17 lines Merged revisions 300621 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r300621 | tilghman | 2011-01-05 12:47:46 -0600 (Wed, 05 Jan 2011) | 10 lines Use the sanity check in place of the disconnect/connect cycle. The disconnect/connect cycle has the potential to cause random crashes. (closes issue #18243) Reported by: ks3 Patches: res_odbc.patch uploaded by ks3 (license 1147) Tested by: ks3 ........ ................ ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@300624 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-26Merged revisions 283659 via svnmerge from Russell Bryant
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r283659 | russell | 2010-08-26 08:26:14 -0500 (Thu, 26 Aug 2010) | 2 lines Slight improvement to a debug message. ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283660 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-25Merged revisions 283561 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r283561 | tilghman | 2010-08-25 11:12:43 -0500 (Wed, 25 Aug 2010) | 5 lines Initialize connect timeout on each time through the loop. (closes issue #17911) Reported by: wurstsalat ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283562 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23Merged revisions 279113 via svnmerge from Tilghman Lesher
https://origsvn.digium.com/svn/asterisk/branches/1.8 ........ r279113 | tilghman | 2010-07-23 13:56:04 -0500 (Fri, 23 Jul 2010) | 2 lines Silly 64-bit compilers (who uses 64-bit anyway?) ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@279115 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23Merge the realtime failover branchTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20Add load priority order, such that preload becomes unnecessary in most casesTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08Implement AstData API data providers as part of the GSOC 2010 project,Eliel C. Sardanons
midterm evaluation. Review: https://reviewboard.asterisk.org/r/757/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-04-22Remove ABI differences that occured when compiling with DEBUG_THREADS.Jason Parker
"Bad Things" would happen if Asterisk was compiled with DEBUG_THREADS, but a loaded module was not (or vice versa). This also immensely simplifies the lock code, since there are no longer 2 separate versions of them. Review: https://reviewboard.asterisk.org/r/508/ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-10-06Recorded merge of revisions 222152 via svnmerge from Kevin P. Fleming
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r222152 | kpfleming | 2009-10-05 20:16:36 -0500 (Mon, 05 Oct 2009) | 20 lines Fix ao2_iterator API to hold references to containers being iterated. See Mantis issue for details of what prompted this change. Additional notes: This patch changes the ao2_iterator API in two ways: F_AO2I_DONTLOCK has become an enum instead of a macro, with a name that fits our naming policy; also, it is now necessary to call ao2_iterator_destroy() on any iterator that has been created. Currently this only releases the reference to the container being iterated, but in the future this could also release other resources used by the iterator, if the iterator implementation changes to use additional resources. (closes issue #15987) Reported by: kpfleming Review: https://reviewboard.asterisk.org/r/383/ ........ git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@222176 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10AST-2009-005Tilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21Const-ify the world (or at least a good part of it)Kevin P. Fleming
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-12add 'const' qualifiers in various places where they should have beenKevin P. Fleming
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@193832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-01Merge changes from str_substitution that are unrelated to that branch.Tilghman Lesher
Included is a small bugfix to an ast_str helper, but most of these changes are simply doxygen fixes. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@185912 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18a few more namespace updates... res_ael_share still needs some work before ↵Kevin P. Fleming
this can be merged to other release branches git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@182848 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-25Oops, wrong direction of commandTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@178573 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19ODBC transaction supportTilghman Lesher
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@177320 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17Add assertions in the quest to track down a refcount leak.Tilghman Lesher
(closes issue #14485) Reported by: davevg git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-19ast_str_SQLGetData is *not* part of the ast_str API, it's part of the ↵Kevin P. Fleming
ast_odbc API and just happens to use an ast_str as the buffer; move all of it to res_odbc.c and res_odbc.h, renaming appropriately along the way fix some minor coding style issues in strings.h and add some attribute_pure annotations to functions in the ast_str API git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@169438 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-15remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB ↵Kevin P. Fleming
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
2008-12-18Fix crashes in res_odbc.Mark Michelson
The variable "class" was being set NULL just prior to being dereferenced in an ao2_link call. I have moved the setting of the variable to NULL until after the ao2_link call. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165724 65c4cc65-6c06-0410-ace0-fbb531ad65f3
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