aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_odbc.c
AgeCommit message (Collapse)AuthorFilesLines
2010-06-03Merged revisions 267669 via svnmerge from tilghman1-2/+22
https://origsvn.digium.com/svn/asterisk/trunk ........ r267669 | tilghman | 2010-06-03 14:46:42 -0500 (Thu, 03 Jun 2010) | 8 lines Handle OOM errors more gracefully. (closes issue #17084) Reported by: falves11 Patches: issue17084_162_A.diff uploaded by falves11 (license 374) Tested by: falves11 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@267670 f38db490-d61c-443f-a65b-d21fe96a405b
2010-05-07Merged revisions 261917 via svnmerge from tilghman1-0/+9
https://origsvn.digium.com/svn/asterisk/trunk ........ r261917 | tilghman | 2010-05-07 15:54:35 -0500 (Fri, 07 May 2010) | 8 lines Double free crash (closes issue #17245) Reported by: thedavidfactor Patches: 20100426__issue17245.diff.txt uploaded by tilghman (license 14) Tested by: murraytm ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@261947 f38db490-d61c-443f-a65b-d21fe96a405b
2009-08-10AST-2009-005tilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@211580 f38db490-d61c-443f-a65b-d21fe96a405b
2009-05-07Merged revisions 193006 via svnmerge from tilghman1-0/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r193006 | tilghman | 2009-05-07 12:51:13 -0500 (Thu, 07 May 2009) | 7 lines Second result should not contain data from the first result. (closes issue #15039) Reported by: jims Patches: 20090506__issue15039.diff.txt uploaded by tilghman (license 14) Tested by: jims ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@193008 f38db490-d61c-443f-a65b-d21fe96a405b
2009-04-08Merged revisions 187050 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ........ r187050 | tilghman | 2009-04-08 12:08:43 -0500 (Wed, 08 Apr 2009) | 7 lines If the first column is empty, output a delimiter anyway. (closes issue #14848) Reported by: john8675309 Patches: 20090408__bug14848.diff.txt uploaded by tilghman (license 14) Tested by: john8675309 ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.2@187051 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-19ODBC transaction supporttilghman1-8/+29
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@177320 f38db490-d61c-443f-a65b-d21fe96a405b
2009-02-17Add assertions in the quest to track down a refcount leak.tilghman1-4/+23
(closes issue #14485) Reported by: davevg git-svn-id: http://svn.digium.com/svn/asterisk/trunk@176592 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-19ast_str_SQLGetData is *not* part of the ast_str API, it's part of the ↵kpfleming1-3/+2
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: http://svn.digium.com/svn/asterisk/trunk@169438 f38db490-d61c-443f-a65b-d21fe96a405b
2009-01-15remove the PBX_ODBC logic from the configure script, and add GENERIC_ODCB ↵kpfleming1-4/+0
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: http://svn.digium.com/svn/asterisk/trunk@168734 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13Merge ast_str_opaque branch (discontinue usage of ast_str internals)tilghman1-67/+54
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-09Avoid allocating memory for a thread that don't need it. Also, this memory ↵eliel1-2/+12
was not being freed until the main thread ends. (That is never). (closes issue #14040) Reported by: eliel Patches: func_odbc.c.patch uploaded by eliel (license 64) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161947 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-07Two bugs relating to colnames found by Marquis42 on #asterisk-devtilghman1-0/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@155395 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-04improve configure script to remember the previous value of each dependency ↵kpfleming1-1/+1
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: http://svn.digium.com/svn/asterisk/trunk@154151 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-03Should have passed the string pointer, not the ast_str structure.tilghman1-2/+2
(closes issue #13830) Reported by: Marquis git-svn-id: http://svn.digium.com/svn/asterisk/trunk@154023 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-02bring over all the fixes for the warnings found by gcc 4.3.x from the 1.4 ↵kpfleming1-2/+6
branch, and add the ones needed for all the new code here too git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153616 f38db490-d61c-443f-a65b-d21fe96a405b
2008-11-01Merge changes from team/group/appdocsxmlrussell1-45/+79
This commit introduces the first phase of an effort to manage documentation of the interfaces in Asterisk in an XML format. Currently, a new format is available for applications and dialplan functions. A good number of conversions to the new format are also included. For more information, see the following message to asterisk-dev: http://lists.digium.com/pipermail/asterisk-dev/2008-October/034968.html git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153365 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-31Failover for func_odbc, allowing an INSERT query to be performed when the ↵tilghman1-25/+88
UPDATE query initially affects 0 rows. (closes issue #13083) Reported by: Corydon76 Patches: 20081031__bug13083.diff.txt uploaded by Corydon76 (license 14) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@153124 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-23allow to compile under --enable-dev-mode (gcc didn't actually complain when ↵twilson1-1/+1
I was using ccache...) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@151830 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-23Simplify some nested functions, as suggested by Russell on -devtilghman1-101/+121
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@151732 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-22Added debugging CLI functionstilghman1-4/+327
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@151682 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-15Permit data fields to contain more than 255 characters.tilghman1-25/+36
(closes issue #13631) Reported by: seanbright Patches: 20081015__bug13631.diff.txt uploaded by Corydon76 (license 14) Tested by: blitzrage git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149687 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-15Only set buf to blank before the goto.tilghman1-2/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@149640 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06All ODBC parts can now use either unixodbc or iodbc.mvanbaak1-1/+3
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: http://svn.digium.com/svn/asterisk/trunk@146925 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-06Merged revisions 146799 via svnmerge from tilghman1-0/+3
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r146799 | tilghman | 2008-10-06 15:52:04 -0500 (Mon, 06 Oct 2008) | 8 lines Dialplan functions should not actually return 0, unless they have modified the workspace. To signal an error (and no change to the workspace), -1 should be returned instead. (closes issue #13340) Reported by: kryptolus Patches: 20080827__bug13340__2.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@146802 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-02Permit the syntax and synopsis fields to be set (for func_odbc).tilghman1-3/+30
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145846 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-12Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiatingtilghman1-2/+2
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: http://svn.digium.com/svn/asterisk/trunk@142992 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-07Continue merging in changes from resolve-shadow-warnings. funcs/ this time.seanbright1-8/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136302 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-06Use a dynamic buffer for rendered SQL, instead of hardcoding 2048 bytes. Also,tilghman1-37/+60
switch to using RWLISTs for the linked list of queries. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@136034 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-05make datastore creation and destruction a generic API since it is not really ↵kpfleming1-3/+3
channel related, and add the ability to add/find/remove datastores to manager sessions git-svn-id: http://svn.digium.com/svn/asterisk/trunk@135680 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Merged revisions 106552 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r106552 | tilghman | 2008-03-07 00:36:33 -0600 (Fri, 07 Mar 2008) | 6 lines Safely use the strncat() function. (closes issue #11958) Reported by: norman Patches: 20080209__bug11958.diff.txt uploaded by Corydon76 (license 14) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@106553 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-26Use the readhandle for reads (closes issue #12069)tilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104125 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-18Convert func_odbc to use SQLExecDirect for speedtilghman1-5/+5
(closes issue #10723) Reported by: mnicholson Patches: func-odbc-direct-execute1.diff uploaded by mnicholson (license 96) Tested by: Corydon76, mnicholson, falves11 git-svn-id: http://svn.digium.com/svn/asterisk/trunk@99018 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-02Change instances of AST_NONSTANDARD_APP_ARGS(foo, bar, ',') to ↵mmichelson1-2/+2
AST_STANDARD_APP_ARGS(foo, bar) (closes issue #11668, reported and patched by mvanbaak) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@95994 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-3/+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-11-01This commits the performance mods that give the priority processing engine ↵murf1-2/+2
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-10-28Merged revisions 87262 via svnmerge from tilghman1-2/+51
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87262 | tilghman | 2007-10-28 08:46:55 -0500 (Sun, 28 Oct 2007) | 7 lines Add autoservice to several more functions which might delay in their responses. Also, make sure that func_odbc functions have a channel on which to set variables. Reported by russell Fixed by tilghman Closes issue #11099 ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87263 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-21use ast_atomic_fetchadd_int for incrementing resultcountrussell1-4/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80226 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16Don't reload a configuration file if nothing has changed.tilghman1-2/+7
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-31Mostly cleanup of documentation to substitute the pipe with the comma, but a ↵tilghman1-6/+8
few other formatting cleanups, too. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@77808 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26Do a massive conversion for using the ast_verb() macrorussell1-2/+1
(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-23Merge the dialplan_aesthetics branch. Most of this patch simply converts ↵tilghman1-2/+1
applications using old methods of parsing arguments to using the standard macros. However, the big change is that the really old way of specifying application and arguments separated by a comma will no longer work (e.g. NoOp,foo|bar). Instead, the way that has been recommended since long before 1.0 will become the only method available (e.g. NoOp(foo,bar). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@76703 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-19After some study, thought, comparing, etc. I've backed out the previous ↵murf1-1/+1
universal mod to make ast_flags a 64 bit thing. Instead, I added a 64-bit version of ast_flags (ast_flags64), and 64-bit versions of the test-flag, set-flag, etc. macros, and an app_parse_options64 routine, and I use these in app_dial alone, to eliminate the 30-option limit it had grown to meet. There is room now for 32 more options and flags. I was heavily tempted to implement some of the other ideas that were presented, but this solution does not intro any new versions of dial, doesn't have a different API, has a minimal/zero impact on code outside of dial, and doesn't seriously (I hope) affect the code structure of dial. It's the best I can think of right now. My goal was NOT to rewrite dial. I leave that to a future, coordinated effort. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75983 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-17via 10206, I have added an option (e) to Dial to allow the h exten to get ↵murf1-1/+1
run on peer. Had to upgrade ast_flag stuff to 64 bits to do this. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@75400 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-06Issue 9869 - replace malloc and memset with ast_calloc, and other coding ↵tilghman1-21/+21
guidelines changes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-01Merged revisions 66919 via svnmerge from tilghman1-1/+9
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r66919 | tilghman | 2007-06-01 16:45:44 -0500 (Fri, 01 Jun 2007) | 2 lines On some drivers, deallocating the statement handle isn't enough. We also have to clear the cursor (nice, Oracle) ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66920 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-31Issue 9799 - Multirow results for func_odbctilghman1-60/+233
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@66734 f38db490-d61c-443f-a65b-d21fe96a405b