dect
/
asterisk
Archived
13
0
Fork 0
Commit Graph

66 Commits

Author SHA1 Message Date
kpfleming 870bfecfe6 Merged revisions 182808 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r182808 | kpfleming | 2009-03-17 20:55:22 -0500 (Tue, 17 Mar 2009) | 5 lines
  
  Improve the build system to *properly* remove unnecessary symbols from the runtime global namespace. Along the way, change the prefixes on some internal-only API calls to use a common prefix.
  
  With these changes, for a module to export symbols into the global namespace, it must have *both* the AST_MODFLAG_GLOBAL_SYMBOLS flag and a linker script that allows the linker to leave the symbols exposed in the module's .so file (see res_odbc.exports for an example).
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@182826 f38db490-d61c-443f-a65b-d21fe96a405b
2009-03-18 02:21:23 +00:00
tilghman a41b34a63c Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@163991 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-13 08:36:35 +00:00
eliel 6e243a5434 Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: http://svn.digium.com/svn/asterisk/trunk@161218 f38db490-d61c-443f-a65b-d21fe96a405b
2008-12-05 10:31:25 +00:00
tilghman 4d59ca2641 Merge realtime_update2 branch, which adds a new realtime API call named
'update2', which permits updates which match across multiple columns, instead
of requiring all tables to have a single unique identifier.  All of the other
API calls with the exception of 'update' already had the ability to match on
multiple fields, so it was a missing and very desireable feature that an API
call implementing an update should have this, too.

This does not change any outward performance of Asterisk, but it should make
life easier for application developers who use the RealTime framework.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@148570 f38db490-d61c-443f-a65b-d21fe96a405b
2008-10-14 00:08:52 +00:00
mvanbaak b6fa2c3b98 Merge the cli_cleanup branch.
This work is done by lmadsen, junky and mvanbaak
during AstriDevCon.

This is the second audit the CLI got, and
this time lmadsen made sure he had _ALL_ modules
loaded that have CLI commands in them.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145121 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-28 23:32:14 +00:00
tilghman 74e9c236bd Change several improper "sizeof" to "strlen", as sizeof in that context would
incorrectly use the size of a pointer, rather than the length of a string.
(Closes issue #13574)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@145076 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-28 21:39:07 +00:00
tilghman 95bae85759 Create a new config file status, CONFIG_STATUS_FILEINVALID for differentiating
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-09-12 23:30:03 +00:00
seanbright 1013afa1ad All of the res/ stuff (other than res_jabber) from the RSW branch.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@137028 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-10 00:47:56 +00:00
tilghman b797b71916 Increase column size beyond the minimum required, since PostgreSQL won't let
us modify existing columns.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@134925 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-31 20:10:39 +00:00
seanbright 59d9255501 Fix some usages of snprintf, and clarify a couple variable names.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@129864 f38db490-d61c-443f-a65b-d21fe96a405b
2008-07-11 00:55:06 +00:00
tilghman 7f93a2e6d8 Properly detect the size of char/varchar fields
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@122716 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-13 21:50:28 +00:00
tilghman e8556a10e2 Expand RQ_INTEGER type out to multiple types, one for each precision
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@121367 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-09 22:51:59 +00:00
tilghman 13366a3a41 Merge the adaptive realtime branch, which will make adding new required fields
to realtime less painful in the future.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@120789 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-05 19:07:27 +00:00
qwell 54440f480c Merged revisions 114829 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r114829 | qwell | 2008-04-29 12:08:55 -0500 (Tue, 29 Apr 2008) | 1 line

Change warning message to debug, since there are cases where 0 results is perfectly fine.
........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@114830 f38db490-d61c-443f-a65b-d21fe96a405b
2008-04-29 17:10:55 +00:00
tilghman dbcca86ee1 An offhand comment from Russell made me realize that the configuration file
caching would not work properly for users.conf and any other file read from
more than one place.  I needed to add the filename which requested the config
file to get it to work properly.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@107791 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-11 22:55:16 +00:00
file 6a5da29722 Fix building of trunk. dbpass is always going to exist.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104081 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-25 15:12:48 +00:00
murf e8023a22a3 On a 64-bit machine, with dev-mode turned on, and pgsql installed, I get warnings that stops the compile. They are fixed now.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104073 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-24 00:44:14 +00:00
tilghman 25e04d2d7d Allow database password to be NULL and several other cleanups.
(closes issue #12048)
 Reported by: bukaj
 Patches: 
       20080222__bug12048.diff.txt uploaded by Corydon76 (license 14)
 Tested by: bukaj


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@104036 f38db490-d61c-443f-a65b-d21fe96a405b
2008-02-22 22:39:21 +00:00
tilghman e2ccfacb81 Merged revisions 96318 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r96318 | tilghman | 2008-01-03 15:37:02 -0600 (Thu, 03 Jan 2008) | 4 lines

Missed initialization caused crash.
Reported and fixed by: tiziano
(Closes issue #11671)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@96332 f38db490-d61c-443f-a65b-d21fe96a405b
2008-01-03 21:43:58 +00:00
tilghman 13d1f2b914 Merged revisions 90736 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90736 | tilghman | 2007-12-03 17:23:55 -0600 (Mon, 03 Dec 2007) | 5 lines

If both dbhost and dbsock were not set, a NULL deref could result
Reported by: xrg
Patch by: tilghman
(Closes issue #11387)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90737 f38db490-d61c-443f-a65b-d21fe96a405b
2007-12-03 23:29:57 +00:00
tilghman 271af78f82 Merged revisions 90160 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r90160 | tilghman | 2007-11-29 13:24:11 -0600 (Thu, 29 Nov 2007) | 2 lines

Properly escape input buffers (Fixes AST-2007-025)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@90162 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-29 19:35:49 +00:00
rizzo de2db05332 remove a bunch of useless #include "options.h"
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89511 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-21 23:09:02 +00:00
rizzo 9cf442d7f7 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: http://svn.digium.com/svn/asterisk/trunk@89424 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-19 18:52:04 +00:00
rizzo 883346d64a 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: http://svn.digium.com/svn/asterisk/trunk@89333 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-16 20:04:58 +00:00
qwell 7756b987a0 Switch from AST_CLI (formerly NEW_CLI) to AST_CLI_DEFINE, since the former didn't make much sense
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86820 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-22 20:05:18 +00:00
qwell d542122e6a Convert NEW_CLI to AST_CLI.
Closes issue #11039, as suggested by seanbright.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86536 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19 18:29:40 +00:00
qwell 4723d35127 More changes to NEW_CLI.
Also fixes a few cli messages and some minor formatting.

(closes issue #11001)
Reported by: seanbright
Patches:
      newcli.1.patch uploaded by seanbright (license 71)
      newcli.2.patch uploaded by seanbright (license 71)
      newcli.4.patch uploaded by seanbright (license 71)
      newcli.5.patch uploaded by seanbright (license 71)
      newcli.6.patch uploaded by seanbright (license 71)
      newcli.7.patch uploaded by seanbright (license 71)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86534 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-19 18:01:00 +00:00
russell 16927b7f7a Merged revisions 83432 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r83432 | russell | 2007-09-21 09:37:20 -0500 (Fri, 21 Sep 2007) | 4 lines

gcc 4.2 has a new set of warnings dealing with cosnt pointers.  This set of
changes gets all of Asterisk (minus chan_alsa for now) to compile with gcc 4.2.
(closes issue #10774, patch from qwell)

........


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@83433 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-21 14:40:10 +00:00
murf 88e10708c5 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: http://svn.digium.com/svn/asterisk/trunk@81361 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-29 20:55:40 +00:00
tilghman 13f1a2e899 store and destroy implementations for realtime pgsql (closes issue #10372)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79859 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-17 13:40:11 +00:00
tilghman dbec3d56c1 Don't reload a configuration file if nothing has changed.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79747 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-16 21:09:46 +00:00
russell 4f3c4dc7f2 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: http://svn.digium.com/svn/asterisk/trunk@77299 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-26 15:49:18 +00:00
file 9e24ed5ccf 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: http://svn.digium.com/svn/asterisk/trunk@75183 f38db490-d61c-443f-a65b-d21fe96a405b
2007-07-16 13:35:20 +00:00
tilghman 5d6dc7ab73 Remove the ill-advised ast_restrdupa API call and related structures
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@72492 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-28 19:41:18 +00:00
russell f042431847 Add a massive set of changes for converting to use the ast_debug() macro.
(issue #9957, patches from mvanbaak, caio1982, critch, and dimas)


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69327 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-14 19:39:12 +00:00
qwell c00b437f55 Continuation of issue 9968 (revision 69081). This should be the last one.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@69108 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-13 17:37:06 +00:00
tilghman eb5d461ed4 Issue 9869 - replace malloc and memset with ast_calloc, and other coding guidelines changes
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@67864 f38db490-d61c-443f-a65b-d21fe96a405b
2007-06-06 21:20:11 +00:00
kpfleming 0fab3b4de2 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: http://svn.digium.com/svn/asterisk/trunk@62824 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-03 00:10:38 +00:00
russell 6559015193 Constify a bunch of usage strings for CLI commands.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@48305 f38db490-d61c-443f-a65b-d21fe96a405b
2006-12-06 07:31:28 +00:00
mogorman 4a1aaf52ae bug #8076 check option_debug before printing to debug channel.
patch provided in bugnote, with minor changes.


git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44253 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-03 15:53:07 +00:00
file 113df5b62a Magical eightball says warnings be gone.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43369 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-20 21:03:37 +00:00
kpfleming 5aacb6a82d merge qwell's CLI verbification work
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43212 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18 19:54:18 +00:00
file ad75968657 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: http://svn.digium.com/svn/asterisk/trunk@43162 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-18 15:15:33 +00:00
mogorman 73925ee14a 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: http://svn.digium.com/svn/asterisk/trunk@41633 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31 21:00:20 +00:00
kpfleming 8b0c007ad9 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: http://svn.digium.com/svn/asterisk/trunk@40722 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-21 02:11:39 +00:00
file c9d4b54d8f Move STD_MOD declaration to end of file as per the norm of everything else (issue #7711 reported by Mithraen)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39514 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-11 15:05:19 +00:00
north d417e51f78 Remove "initialization from incompatible pointer type" warnings.
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38010 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19 22:48:00 +00:00
kpfleming 4bf77fda2f restore buildability
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37952 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-19 17:21:33 +00:00
russell ed09a7dc4c remove the unused usecount function to eliminate a compiler warning
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37288 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-07 06:58:16 +00:00
kpfleming 73c525e6e2 simplify autoconfig include mechanism (make tholo happy he can use lint again :-)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32846 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-07 18:54:56 +00:00