aboutsummaryrefslogtreecommitdiffstats
path: root/funcs/func_odbc.c
AgeCommit message (Collapse)AuthorFilesLines
2008-11-03port gcc 4.3.x warning fixes from trunk to this branchkpfleming1-24/+40
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@153743 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-07Merged revisions 106553 via svnmerge from tilghman1-1/+1
https://origsvn.digium.com/svn/asterisk/trunk ................ r106553 | tilghman | 2008-03-07 00:54:47 -0600 (Fri, 07 Mar 2008) | 14 lines Merged revisions 106552 via svnmerge from 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/branches/1.6.0@106554 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
2007-02-09Merged revisions 53779-53781 via svnmerge from kpfleming1-0/+1
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r53779 | kpfleming | 2007-02-09 17:51:29 -0600 (Fri, 09 Feb 2007) | 2 lines fix awk scripts to work when both MODULEINFO and MAKEOPTS are present in a source file ........ r53780 | kpfleming | 2007-02-09 17:51:41 -0600 (Fri, 09 Feb 2007) | 2 lines add some inter-module dependencies ........ r53781 | kpfleming | 2007-02-09 17:52:44 -0600 (Fri, 09 Feb 2007) | 2 lines another dependency ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53782 f38db490-d61c-443f-a65b-d21fe96a405b
2007-02-03Fix compiler warningstilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@53140 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-24Doxygen updateoej1-0/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51920 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-17Merged revisions 51205 via svnmerge from russell1-0/+6
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r51205 | russell | 2007-01-17 17:31:11 -0600 (Wed, 17 Jan 2007) | 5 lines Fix some instances where when loading func_odbc, a double-free could occur. Also, remove an unneeded error message. If the failure condition is actually a memory allocation failure, a log message will already be generated automatically. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@51207 f38db490-d61c-443f-a65b-d21fe96a405b
2007-01-06finish const-ifying ast_func_read()kpfleming1-3/+3
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49741 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-30Initialize obj pointers to NULL. Gets rid of two compiler warnings.file1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49065 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-28Integrate functionality tested on svncommunity users back into trunktilghman1-54/+130
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@49030 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-19Merged revisions 48577 via svnmerge from kpfleming1-2/+2
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r48577 | kpfleming | 2006-12-19 08:57:09 -0600 (Tue, 19 Dec 2006) | 2 lines use the proper variable type for these unixODBC API calls, eliminating warnings on 64-bit platforms that use the 'new' 64-bit types for ODBC API calls ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48578 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20Constify the result of a config retrieval function, to avoid mutilation ↵tilghman1-1/+1
(issue 7983). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20move ODBC API into ast_ namespacekpfleming1-10/+10
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43311 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-05Missing field terminatortilghman1-0/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@42034 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/+8
- 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-08-20Convert func_odbc to use the prepare_and_execute callback, which helps with ↵tilghman1-91/+38
a database reconnection issue (bug 7693) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@40632 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07simplify autoconfig include mechanism (make tholo happy he can use lint ↵kpfleming1-4/+4
again :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-27Should use the named handle, not one hardcodedtilghman1-1/+1
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30653 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-26Lets not commit things that cause Asterisk to break when config files aren't ↵markster1-2/+2
present. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@30490 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-22Escaping commas within fields isn't always desireable.tilghman1-2/+17
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@29364 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-16Argument macro janitor for func_odbc, fixes #7171tilghman1-47/+39
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@27522 f38db490-d61c-443f-a65b-d21fe96a405b
2006-05-06 Fix output delimiters and add prefix parameter to func_odbc #7025 (Corydon76)bweschke1-163/+132
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@25234 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-24Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have ↵kpfleming1-0/+6
autoconf and menuselect tools for Asterisk! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22267 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-18update res_odbc to support pooled connectionsrussell1-9/+9
(from tilghman's developer branch, res_odbc_rewrite) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@21181 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14Compatibility fixes for loader changestilghman1-2/+2
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20075 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-14This rather large commit changes the way modules are loaded. rizzo1-13/+6
As partly documented in loader.c and include/asterisk/module.h, modules are now expected to return all of their methods and flags into a structure 'mod_data', and are normally loaded with RTLD_NOW | RTLD_LOCAL, so symbols are resolved immediately and conflicts should be less likely. Only in a small number of cases (res_*, typically) modules are loaded RTLD_GLOBAL, so they can export symbols. The core of the change is only the two files loader.c and include/asterisk/module.h, all the rest is simply adaptation of the existing modules to the new API, a rather mechanical (but believe me, time and finger-consuming!) process whose detail you can figure out by svn diff'ing any single module. Expect some minor compilation issue after this change, please report it on mantis http://bugs.digium.com/view.php?id=6968 so we collect all the feedback in one place. I am just sorry that this change missed SVN version number 20000! git-svn-id: http://svn.digium.com/svn/asterisk/trunk@20003 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-11Bugs 6883, 6930: compiler warningstilghman1-8/+8
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@19095 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-02-23Some sick individuals use SQL queries longer than 512 bytes in the dialplan. ↵tilghman1-4/+4
;-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@10895 f38db490-d61c-443f-a65b-d21fe96a405b
2006-02-12major dialplan functions updatekpfleming1-40/+30
deprecate LANGUAGE() and MUSICCLASS(), in favor of CHANNEL() git-svn-id: http://svn.digium.com/svn/asterisk/trunk@9674 f38db490-d61c-443f-a65b-d21fe96a405b