Commit Graph

75 Commits

Author SHA1 Message Date
Tilghman Lesher f1de129e5f Merged revisions 89559 via svnmerge from
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-25 17:50:07 +00:00
Tilghman Lesher 6792b619f7 Merged revisions 89534 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r89534 | tilghman | 2007-11-23 11:05:10 -0600 (Fri, 23 Nov 2007) | 5 lines

Use ESCAPE clause for the first parameter, not just 2nd-Nth parameters.
Reported by: apsaras
Patch by: tilghman
(Closes issue #11353)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-23 17:09:06 +00:00
Luigi Rizzo e0ff5fef5c remove a bunch of useless #include "options.h"
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89511 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-21 23:09:02 +00:00
Luigi Rizzo 0595b5e2aa include "logger.h" and errno.h from asterisk.h - usage shows that they
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-19 18:52:04 +00:00
Luigi Rizzo fdb7f7ba3d Start untangling header inclusion in a way that does not affect
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-16 20:04:58 +00:00
Russell Bryant d78463be1e Corydon posted this janitor project to the bug tracker and mvanbaak provided
a patch for it.  It replaces a bunch of simple calls to snprintf with ast_copy_string

(closes issue #10843)
Reported by: Corydon76
Patches: 
      2007092900_10843.diff uploaded by mvanbaak (license 7)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@84173 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-10-01 15:23:19 +00:00
Jason Parker d72ea80a00 Doxygen cleanups/fixes.
Closes issue #10654, patch by snuffy


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-09-05 16:31:39 +00:00
Steve Murphy b5cd67adc3 This code was in team/murf/bug8684-trunk; it should fix bug 8684 in trunk. I didn't add it to 1.4 yet, because it's not entirely clear to me if this is a bug fix or an enhancement. A lot of files were affected by small changes like ast_variable_new getting an added arg, for the file name the var was defined in; ast_category_new gets added args of filename and lineno; ast_category and ast_variable structures now record file and lineno for each entry; a list of all #include and #execs in a config file (or any of its inclusions are now kept in the ast_config struct; at save time, each entry is put back into its proper file of origin, in order. #include and #exec directives are folded in properly. Headers indicating that the file was generated, are generated also for each included file. Some changes to main/manager.c to take care of file renaming, via the UpdateConfig command. Multiple inclusions of the same file are handled by exploding these into multiple include files, uniquely named. There's probably more, but I can't remember it right now.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@81361 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-29 20:55:40 +00:00
Tilghman Lesher c78ddffb04 store and destroy implementations for sqlite (closes issue #10446) and odbc (closes issue #10447)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79860 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-17 13:45:44 +00:00
Tilghman Lesher 56b9568164 Don't reload a configuration file if nothing has changed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@79747 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-16 21:09:46 +00:00
Russell Bryant d8965ddabe Merged revisions 78488 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78488 | russell | 2007-08-07 15:57:54 -0500 (Tue, 07 Aug 2007) | 2 lines

Fix the build of this module on 64-bit platforms

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78489 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 21:00:10 +00:00
Tilghman Lesher f78ff66a4d Merged revisions 78415 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r78415 | tilghman | 2007-08-07 14:09:38 -0500 (Tue, 07 Aug 2007) | 2 lines

Reconnection doesn't happen automatically when a DB goes down (fixes issue #9389)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@78417 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-08-07 19:14:45 +00:00
Russell Bryant f8483a0d04 Do a massive conversion for using the ast_verb() macro
(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: https://origsvn.digium.com/svn/asterisk/trunk@77299 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-26 15:49:18 +00:00
Russell Bryant eaebbdab61 (closes issue #10271)
Reported by: snuffy
Patches:
      doxygen-updates.diff uploaded by snuffy (license 35)

Another big batch of doxygen documentation updates


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@76559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-23 14:32:04 +00:00
Joshua Colp 96a646734f It is no longer required for each module that deals with a channel to call ast_module_user_hangup_all in it's unload function. The loader will automatically perform this action for it.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@75183 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-16 13:35:20 +00:00
Russell Bryant 4f84931f12 Merged revisions 74657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r74657 | russell | 2007-07-11 13:34:51 -0500 (Wed, 11 Jul 2007) | 12 lines

Merged revisions 74656 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r74656 | russell | 2007-07-11 13:33:23 -0500 (Wed, 11 Jul 2007) | 4 lines

Make sure that the ESCAPE immediately follows the condition that uses LIKE.
This fixes realtime extensions with ODBC.
(closes issue #10175, reported by stuarth, patch by me)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-11 18:35:36 +00:00
Russell Bryant 760649be75 Merged revisions 74314 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r74314 | russell | 2007-07-10 10:31:41 -0500 (Tue, 10 Jul 2007) | 11 lines

Merged revisions 74313 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r74313 | russell | 2007-07-10 10:30:20 -0500 (Tue, 10 Jul 2007) | 3 lines

Only use ESCAPE when LIKE is used.  
(issue #10075, this part reported by jmls on IRC, patch by me)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@74315 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-10 15:32:21 +00:00
Russell Bryant 53756e6716 Merged revisions 73696 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r73696 | russell | 2007-07-06 11:12:51 -0500 (Fri, 06 Jul 2007) | 16 lines

Merged revisions 73684 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r73684 | russell | 2007-07-06 11:06:27 -0500 (Fri, 06 Jul 2007) | 8 lines

(closes issue #10075)
Reported by: apsaras
Patches submitted by: Corydon76
Tested by: apsaras

Fix a problem with MSSQL 2005 by explicitly stating that '\' is being used as
an escape character.

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@73701 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-06 16:14:39 +00:00
Tilghman Lesher a952147446 Remove the ill-advised ast_restrdupa API call and related structures
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@72492 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-06-28 19:41:18 +00:00
Russell Bryant 43658278ff Merged revisions 69702 via svnmerge from
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-18 16:35:51 +00:00
Tilghman Lesher 1236ed3214 Issue 9477 - Improve menuselect labels
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@66585 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-30 05:17:09 +00:00
Kevin P. Fleming f44a236d08 Merged revisions 62842 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r62842 | kpfleming | 2007-05-02 20:23:37 -0400 (Wed, 02 May 2007) | 10 lines

Merged revisions 62841 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r62841 | kpfleming | 2007-05-02 20:23:00 -0400 (Wed, 02 May 2007) | 2 lines

doh... initializing the pointer variable will work just a bit better

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62843 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 00:25:50 +00:00
Kevin P. Fleming a2c8e8a4a7 Merged revisions 62797,62807 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

................
r62797 | kpfleming | 2007-05-02 19:57:23 -0400 (Wed, 02 May 2007) | 7 lines

improve static Realtime config loading from PostgreSQL:
	don't request sorting on fields that are pointless to sort on
	use ast_build_string() instead of snprintf()
	don't request the list of fieldnames that resulted from the query when we both knew what they were before we ran the query _AND_ we aren't going to do anything with them anyway

(patch by me, inspired by blitzrage's bug report about res_config_odbc)

................
r62807 | kpfleming | 2007-05-02 20:02:57 -0400 (Wed, 02 May 2007) | 15 lines

Merged revisions 62796 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.2

........
r62796 | kpfleming | 2007-05-02 19:53:46 -0400 (Wed, 02 May 2007) | 7 lines

increase reliability and efficiency of static Realtime config loading via ODBC:
	don't request fields we aren't going to use
	don't request sorting on fields that are pointless to sort on
	explicitly request the fields we want, because we can't expect the database to always return them in the order they were created
	
(reported by blitzrage in person (!), patch by me)

........

................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@62824 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-05-03 00:10:38 +00:00
Kevin P. Fleming e758ef09b3 Merged revisions 53779-53781 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@53782 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-02-09 23:53:51 +00:00
Tilghman Lesher c4c2c546da When calling the Realtime app more than once, unset fields which were
previously set are erroneously still set (Bug 6701).  After discussion,
it was determined this should only be changed in trunk.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@49801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-01-07 16:21:12 +00:00
Kevin P. Fleming 518f25f65c Merged revisions 48577 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@48578 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-19 14:57:45 +00:00
Steve Murphy e52822b3bf a fix for bug 8251; the var_val needs to accept longer strings or mass confusion and a lot of lost time is the result
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46801 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-11-01 19:48:40 +00:00
Kevin P. Fleming 32d119746c move ODBC API into ast_ namespace
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43311 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 04:57:20 +00:00
Kevin P. Fleming 0a27d8bfe5 merge new_loader_completion branch, including (at least):
- 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: https://origsvn.digium.com/svn/asterisk/trunk@40722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-21 02:11:39 +00:00
North Antara 346c291a2d Remove "initialization from incompatible pointer type" warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@38010 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 22:48:00 +00:00
Kevin P. Fleming 886a6bd6f9 restore buildability (bad marko!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:16:08 +00:00
Kevin P. Fleming 472c1ca282 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32846 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-07 18:54:56 +00:00
Russell Bryant 04ecb29d03 remove almost all of the checks of the result from ast_strdupa() or alloca().
As it turns out, all of these checks were useless, because alloca will never
return NULL.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@26451 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-05-10 13:22:15 +00:00
Kevin P. Fleming 574e14cbea Thanks to the fine work of Russell Bryant and Dancho Lazarov, we now have autoconf and menuselect tools for Asterisk!
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@22267 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-24 17:11:45 +00:00
Russell Bryant 501ac5189c update res_odbc to support pooled connections
(from tilghman's developer branch, res_odbc_rewrite)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@21181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-18 18:16:32 +00:00
Luigi Rizzo e43bc6634d This rather large commit changes the way modules are loaded.
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: https://origsvn.digium.com/svn/asterisk/trunk@20003 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 14:08:19 +00:00
Luigi Rizzo 7507309732 normalize code in preparation to module changes
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@19189 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-11 10:01:00 +00:00
Kevin P. Fleming 699f55071b a few cleanups from the last commit
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18572 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-08 22:16:34 +00:00
Tilghman Lesher c6f691fbcc Merged revisions 11503 via svnmerge from
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: https://origsvn.digium.com/svn/asterisk/trunk@11504 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-03-01 17:53:05 +00:00
Russell Bryant a0d438fb6c remove the uses of the deprecated STANDARD_LOCAL_USER
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@10241 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-02-15 20:11:56 +00:00
Russell Bryant a725468381 update doxygen docs to specify authors
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7682 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-12-30 21:18:06 +00:00
Kevin P. Fleming 2c65582b66 remove extraneous svn:executable properties
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-29 18:24:39 +00:00
Kevin P. Fleming 7b2e24777f issue #5650
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7030 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-08 19:47:56 +00:00
Kevin P. Fleming a0a9769616 issue #5648
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@7011 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-11-08 01:55:31 +00:00
Kevin P. Fleming 551ac9af04 don't use 'rowcount' after SELECT statements, since the ODBC API does not say it is allowed (issue #5083)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6904 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-31 21:31:25 +00:00
Russell Bryant 3453e3efa5 Doxygen documentation update from oej (issue #5505)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6847 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-10-24 20:12:06 +00:00
Kevin P. Fleming 5da915dcfd update MANY more files with proper copyright/license info (thanks Ian!)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@6596 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-09-14 20:46:50 +00:00
Kevin P. Fleming 2b8338cb52 more file version tags
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5866 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-06-06 22:12:19 +00:00
Kevin P. Fleming c2ef8373c7 report the number of rows updated when using RealTime update method (bug #4066)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5496 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-22 03:29:03 +00:00
Kevin P. Fleming 0687688042 ensure that res_config_odbc can handle columns with NULL values (bug #3787)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2005-04-22 01:59:53 +00:00