Commit Graph

29 Commits

Author SHA1 Message Date
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
Russell Bryant af870057c1 Constify a bunch of usage strings for CLI commands.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48305 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-12-06 07:31:28 +00:00
Matt O'Gorman ae8cc3e18b bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@44253 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-10-03 15:53:07 +00:00
Joshua Colp e8b820e743 Magical eightball says warnings be gone.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43369 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-20 21:03:37 +00:00
Kevin P. Fleming fcb999c01c merge qwell's CLI verbification work
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43212 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 19:54:18 +00:00
Joshua Colp 93e161256d Use a better check to ensure database connection is up (pointer to connection must exist, and connection must report status being ok) (issue #7955 reported by sorg)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@43162 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-09-18 15:15:33 +00:00
Matt O'Gorman 05a695af72 everything that loads a config that needs a config file to run
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: https://origsvn.digium.com/svn/asterisk/trunk@41633 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-31 21:00: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
Joshua Colp c5e5efb237 Move STD_MOD declaration to end of file as per the norm of everything else (issue #7711 reported by Mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@39514 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-08-11 15:05:19 +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 a353387ea7 restore buildability
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37952 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-19 17:21:33 +00:00
Russell Bryant a10e1dad07 remove the unused usecount function to eliminate a compiler warning
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@37288 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-07-07 06:58:16 +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 1f7db8df6a add missing include
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@32673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-06-06 19:07:52 +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
Luigi Rizzo 532e552c1f add reload() (bug 9981)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@23273 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-29 04:55:47 +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
Luigi Rizzo 8d98d44e82 fix another svn merge bug
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@20076 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-14 18:45:08 +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
Russell Bryant f7c5aee2ad remove a couple more unnecessary "out of memory" error messages
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18723 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:19:58 +00:00
Russell Bryant 7878538953 use ast_*alloc and don't create duplicated error messages.
... as stated in the coding guidelines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18722 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:15:47 +00:00
Russell Bryant 9a5c7c75a3 Instead of using strncpy, use ast_copy_string. Also, in the case of copying a
constant string into a buffer that we know is big enough, don't use a length
limited copy at all, use strcpy.

... as stated in the coding guidelines.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18721 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:05:59 +00:00
Russell Bryant d13bc3fc83 run the module through indent to fix the formatting issues that violate the
coding guidelines


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18704 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 02:01:39 +00:00
Russell Bryant d203e9c6c0 add back braces that were removed in a recent commit that leave a bunch of
nested statements in a block without branches, which is a violation of the
coding guidelines.

As a matter of fact, this module violates the coding guidelines in multiple
ways that including formatting and code issues.  In my opinion, this module
should not have been merged into the trunk in this form.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18693 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-10 01:51:47 +00:00
Olle Johansson 70f18e5f31 Issue 6917 - some cleanups for res_config_pgsql.c (mithraen)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@18607 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-09 18:57:25 +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
Olle Johansson d75fed39ca Issue #6893 - Compiler warnings for PostgreSQL ARA driver
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17740 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-06 06:55:38 +00:00
Olle Johansson ef6b50b706 Issue #5637 - Realtime driver for PostgreSQL (mguesdon)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@17628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2006-04-05 17:46:09 +00:00