Commit Graph

137 Commits

Author SHA1 Message Date
Richard Mudgett a657ab12f9 app_directory: Fix crash when using the alias option 'a'.
The voicemail.conf mailbox key/value pair is defined as:
<mailbox>=[<password>[,<full-name>[,<email>[,<pager>[,<options>]]]]]
Where all fields in the value including the field values are optional.

Since the parsing code for the mailbox key/value pair is sloppy, this
patch tightens the parsing for the directory information.

* Renamed the 'pos' and 'bufptr' variables to 'name' and 'options'
respectively in search_directory_sub().  Those names make more sense.

* Made sure that search_directory_sub() is dealing with the voicemail.conf
mailbox options field if it even exists when looking for the 'hidefromdir'
and 'alias' options.

* Fix crash if a voicemail.conf mailbox is just
<mailbox>=<password>,<name> when the 'a' option is used.  If there were no
fields after the name then the 'options' pointer was not checked for NULL.

* Fix users.conf alias processing if the 'a' option is used.  The wrong
variable was used.

ASTERISK-25087 #close
Reported by: Chet Stevens

Change-Id: I86052ea77307beddddba5279824d39dc0d593374
2015-06-11 14:59:25 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
Git does not support the ability to replace a token with a version
string during check-in. While it does have support for replacing a
token on clone, this is somewhat sub-optimal: the token is replaced
with the object hash, which is not particularly easy for human
consumption. What's more, in practice, the source file version was often
not terribly useful. Generally, when triaging bugs, the overall version
of Asterisk is far more useful than an individual SVN version of a file. As a
result, this patch removes Asterisk's support for showing source file
versions.

Specifically, it does the following:

* Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
  remove passing the version in with the macro. Other facilities
  than 'core show file version' make use of the file names, such as
  setting a debug level only on a specific file. As such, the act of
  registering source files with the Asterisk core still has use. The
  macro rename now reflects the new macro purpose.

* main/asterisk:
  - Refactor the file_version structure to reflect that it no longer
    tracks a version field.
  - Remove the "core show file version" CLI command. Without the file
    version, it is no longer useful.
  - Remove the ast_file_version_find function. The file version is no
    longer tracked.
  - Rename ast_register_file_version/ast_unregister_file_version to
    ast_register_file/ast_unregister_file, respectively.

* main/manager: Remove value from the Version key of the ModuleCheck
  Action. The actual key itself has not been removed, as doing so would
  absolutely constitute a backwards incompatible change. However, since
  the file version is no longer tracked, there is no need to attempt to
  include it in the Version key.

* UPGRADE: Add notes for:
  - Modification to the ModuleCheck AMI Action
  - Removal of the "core show file version" CLI command

Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
2015-04-13 03:48:57 -04:00
George Joseph c7e6b6ba3d manager/config: Support templates and non-unique category names via AMI
This patch provides the capability to manipulate templates and categories
with non-unique names via AMI.

Summary of changes:

GetConfig and GetConfigJSON: Added "Filter" parameter:  A comma separated list
of name_regex=value_regex expressions which will cause only categories whose
variables match all expressions to be considered.  The special variable name
TEMPLATES can be used to control whether templates are included.  Passing
'include' as the value will include templates along with normal categories.
Passing 'restrict' as the value will restrict the operation to ONLY templates.
Not specifying a TEMPLATES expression results in the current default behavior
which is to not include templates.

UpdateConfig: NewCat now includes options for allowing duplicate category
names, indicating if the category should be created as a template, and
specifying templates the category should inherit from.  The rest of the
actions now accept a filter string as defined above.  If there are non-unique
category names, you can now update specific ones based on variable values.

To facilitate the new capabilities in manager, corresponding changes had to be
made to config, most notably the addition of filter criteria to many of the
APIs.  In some cases it was easy to change the references to use the new
prototype but others would have required touching too many files for this
patch so a wrapper with the original prototype was created.  Macros couldn't
be used in this case because it would break binary compatibility with modules
such as res_digium_phone that are linked to real symbols.

Tested-by: George Joseph

Review: https://reviewboard.asterisk.org/r/4033/
........

Merged revisions 425383 from http://svn.asterisk.org/svn/asterisk/branches/12
........

Merged revisions 425384 from http://svn.asterisk.org/svn/asterisk/branches/13


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@425385 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-10-13 16:12:17 +00:00
Richard Mudgett 86e8ab5ed4 voicemail API callbacks: Extract the sayname API call to its own registerd callback.
* Extract the sayname API call to its own registerd callback.  This allows
the app_directory and app_chanspy applications to say a mailbox owner's
name using an alternate provider when app_voicemail is not available
because you are using res_mwi_external.  app_directory still uses the
voicemail.conf file.

AFS-64 #close
Reported by: Mark Michelson


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@416830 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-20 17:06:42 +00:00
Jonathan Rose a60764d61e app_directory: Set variable indicating reason directory exited
By the time the directory application exits, a channel variable
DIRECTORY_RESULT will be set for the channel that invoked it which
can be used to determine the reason for exit. The changes log and
the app_directory documentation contain specific details about
each of the possible values for DIRECTORY_RESULT.

Review: https://reviewboard.asterisk.org/r/3016/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402995 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-21 22:38:31 +00:00
Kinsey Moore 7b032c1adb Add SayAlphaCase and similar functionality for AGI
This adds a new dialplan application, SayAlphaCase, that performs much
the same function as SayAlpha except that it takes additional options
which allow the user to specify whether the case of each letter should
be announced for uppercase, lowercase, or all letters. Similar
functionality has been added to the SAY ALPHA AGI command via an
optional parameter.

Original Patch by: Kevin Scott Adams
Reported by: Kevin Scott Adams
Review: https://reviewboard.asterisk.org/r/2725/
(closes issue ASTERISK-20782)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397493 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-22 22:33:48 +00:00
Matthew Jordan 671f900225 Don't perform a realtime lookup with a NULL keyword
Previously, a call to ast_load_realtime_multientry could get away with
passing a NULL parameter to the function, even though it really isn't
supposed to do that. After the change over to using ast_variable instead
of variadic arguments, the realtime engine gets unhappy if you do this.

This was always an unintended function call in app_directory anyway - now,
we just don't call into the realtime function calls if we don't have anything
to query on.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@388008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-08 18:36:21 +00:00
Tilghman Lesher 7739ed9989 Add aliases to the Directory.
This is an interesting feature that allows additional strings to be used to
search the Directory, primarily intended to be used with nicknames, but could
be used with affiliations and the like.  Because the name field is used in
more than one place (such as email notifications), it is important that these
additional strings not be placed in the name field, but be specified
separately.

Review: https://reviewboard.asterisk.org/r/2244/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-03 16:04:11 +00:00
Kinsey Moore c6142cf2cc Fix coverity UNUSED_VALUE findings in core support level files
Most of these were just saving returned values without using them and
in some cases the variable being saved to could be removed as well.

(issue ASTERISK-19672)
........

Merged revisions 368738 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 368739 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368751 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-11 15:23:30 +00:00
Sean Bright 4657b016ad Resolve a few more cases of variable shadowing.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@358691 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-08 17:48:14 +00:00
Terry Wilson 57f42bd74f ast_channel opaquification of pointers and integral types
Review: https://reviewboard.asterisk.org/r/1753/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@356042 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-20 23:43:27 +00:00
Terry Wilson 34c55e8e7c Opaquify char * and char[] in ast_channel
Review: https://reviewboard.asterisk.org/r/1733/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354968 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-13 17:27:06 +00:00
Terry Wilson 99cae5b750 Opaquify channel stringfields
Continue channel opaque-ification by wrapping all of the stringfields.
Eventually, we will restrict what can actually set these variables, but
the purpose for now is to hide the implementation and keep people from
adding code that directly accesses the channel structure. Semantic
changes will follow afterward.

Review: https://reviewboard.asterisk.org/r/1661/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352348 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-01-24 20:12:09 +00:00
Leif Madsen a525edea59 Merged revisions 328247 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.10

................
  r328247 | lmadsen | 2011-07-14 16:25:31 -0400 (Thu, 14 Jul 2011) | 14 lines
  
  Merged revisions 328209 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r328209 | lmadsen | 2011-07-14 16:13:06 -0400 (Thu, 14 Jul 2011) | 6 lines
    
    Introduce <support_level> tags in MODULEINFO.
    This change introduces MODULEINFO into many modules in Asterisk in order to show
    the community support level for those modules. This is used by changes committed
    to menuselect by Russell Bryant recently (r917 in menuselect). More information about
    the support level types and what they mean is available on the wiki at
    https://wiki.asterisk.org/wiki/display/AST/Asterisk+Module+Support+States
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@328259 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-14 20:28:54 +00:00
Matthew Nicholson ae3d614ab8 Merged revisions 327890 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r327890 | mnicholson | 2011-07-12 15:07:20 -0500 (Tue, 12 Jul 2011) | 2 lines
  
  search in the current context for 'a' and 'o' instead of 'default'
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@327891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-07-12 20:08:04 +00:00
Jeff Peeler 94df424e1d Merged revisions 263769 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r263769 | jpeeler | 2010-05-18 13:54:58 -0500 (Tue, 18 May 2010) | 10 lines
  
  Modify directory name reading to be interrupted with operator or pound escape.
  
  In the case of accidentally entering the wrong first three letters for the
  reading, users could be very frustrated if the name listing is very long. This
  allows interrupting the reading by pressing 0 or #. 0 will attempt to execute
  a configured operator (o) extension and # will exit and proceed in the
  dialplan.
  
  ABE-2200
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@263807 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-05-18 19:27:34 +00:00
Alec L Davis ba80d2172f Add supporting code for app-directory pause option.
Since 1.6.1 CLI help reports that option p(n) 'initial pause' is available.
Supporting code was never implemented.

(closes issue #16751)
Reported by: alecdavis
Patches: 
      directory_pause.trunk.diff.txt uploaded by alecdavis (license 585)
Tested by: alecdavis

Review: https://reviewboard.asterisk.org/r/481/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@251779 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-11 07:03:51 +00:00
Leif Madsen ecfa2dcb2e Fix literal values wrapped in documentation.
(closes issue #16145)
Reported by: tilghman

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@249950 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-03-02 19:49:48 +00:00
Alec L Davis 13c3260c92 Support option 'n', as applications like Playback, Background etc.
Suggested on asterisk-dev as trivial application change.
 
Reported by: alecdavis
Tested by: alecdavis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@234976 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-15 07:18:31 +00:00
Alec L Davis 90be4cf5ef fixes escape to extensions 'o' and 'a', for digits '0' and '*'
(closes issue #16437)
Reported by: alecdavis
Tested by: alecdavis
Patch
	extension_o_a_fix.diff.txt uploaded by alecdavis (license 585)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@234893 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-15 02:29:50 +00:00
Alec L Davis 19f8080654 ast_stream_and_wait(chan,dir-usingkeypad) didn't capture the dialled DTMF.
(closes issue #16409)
  Reported by: alecdavis
  Tested by: alecdavis
  Patch
	bug_16409.diff.txt uploaded by alecdavis (license 585)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@234855 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-12-15 00:54:44 +00:00
Tilghman Lesher 9298b2602a Fix two possible crashes, one only in 1.6.1 and one in 1.6.1 forward.
(closes issue #15739)
 Reported by: DLNoah, jeffg
 Patches: 
       20090914__issue15739.diff.txt uploaded by tilghman (license 14)
       20090922__issue15739.diff.txt uploaded by tilghman (license 14)
 Tested by: DLNoah, jeffg


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219987 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-24 07:39:44 +00:00
Russell Bryant 12ff77f975 Global var cleanup - constification and removing unused vars.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@199479 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-07 14:55:51 +00:00
Kevin P. Fleming e6b2e9a750 Const-ify the world (or at least a good part of it)
This patch adds 'const' tags to a number of Asterisk APIs where they are appropriate (where the API already demanded that the function argument not be modified, but the compiler was not informed of that fact). The list includes:

- CLI command handlers
- CLI command handler arguments
- AGI command handlers
- AGI command handler arguments
- Dialplan application handler arguments
- Speech engine API function arguments

In addition, various file-scope and function-scope constant arrays got 'const' and/or 'static' qualifiers where they were missing.

Review: https://reviewboard.asterisk.org/r/251/



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@196072 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-21 21:13:09 +00:00
Mark Michelson a7829044ec Merged revisions 165255 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r165255 | mmichelson | 2008-12-17 14:51:38 -0600 (Wed, 17 Dec 2008) | 7 lines

Fix some memory leaks found while looking at how realtime
configs are handled.

Also cleaned up some coding guidelines violations in app_realtime.c,
mostly related to spacing


........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@165318 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-17 21:17:20 +00:00
Russell Bryant 5b168ee34b Merge changes from team/group/appdocsxml
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: https://origsvn.digium.com/svn/asterisk/trunk@153365 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-01 21:10:07 +00:00
Tilghman Lesher 77060afdac Pay attention to the searchcontexts entry in voicemail.conf (related to AST-125)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152727 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-30 02:08:02 +00:00
Mark Michelson 5652a7b81e If there was no named defined in a voicemail.conf mailbox
entry, then app_directory would crash when attempting to
read that entry from the file. We now check for the NULL
or empty string properly so that there will be no crash.

(closes issue #13804)
Reported by: bluecrow76



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@152646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-10-29 20:53:53 +00:00
Tilghman Lesher 08af5bb312 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: https://origsvn.digium.com/svn/asterisk/trunk@142992 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-09-12 23:30:03 +00:00
Sean Bright 3ffb39833b More RSW merges. Everything from apps/ except for the big offenders
app_voicemail and app_queue.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@137055 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-08-10 14:45:25 +00:00
Michiel van Baak 8e8359465b Older versions of GNU gcc do not allow 'NULL' as sentinel.
They want (char *)NULL as sentinel.
An example is OpenBSD (confirmed on 4.3) that ships with gcc 3.3.4

This commit introduces a contstant SENTINEL which is declared as:
#define SENTINEL ((char *)NULL)

All places I could test compile on my openbsd system are converted.
Update CODING-GUIDELINES to tell about this constant.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@124127 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-06-19 20:48:33 +00:00
Mark Michelson 8b1cb3ce53 Make app_directory dependent on app_voicemail. This is because the function
which says the person's name is handled inside app_voicemail now.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114841 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 18:48:26 +00:00
Mark Michelson 6e45d3c223 Since there is now a globally available function for saying someone's name, a LOT of
functions in app_directory can be removed since the ODBC-specific lookups are accomplished
within app_voicemail. This change greatly reduces the amount of lines in app_directory that
were solely for the purpose of looking up a name when ODBC_STORAGE is specified for voicemail.

This commit also makes the name-saying interruptable via DTMF.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114834 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 17:56:13 +00:00
Mark Michelson 1016811538 Fix a crash happening in app_directory. This crash would occur if a users.conf existed.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114832 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-29 17:31:26 +00:00
Jason Parker fe65716e15 If somebody enters a digit during ast_stream_and_wait, the return value is the digit, which we need to use later.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@114149 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-04-15 20:27:04 +00:00
Tilghman Lesher 3826278d38 Upgrade the sounds version; add several directory enhancements:
1) Number of digits to enter can now be configured
	2) The digits can now match on both first AND last name, instead of only one or the other
(Closes issue #7151)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@110237 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-03-20 05:06:12 +00:00
Michiel van Baak 4dccb58fb7 whitespace fixes only.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@103249 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-02-09 11:27:10 +00:00
Mark Michelson e34fc8282c Big improvement for app_directory. This patch breaks the do_directory function up
so that it is more easily parsed by the human brain. It also fixes some errors. I'll quote
dimas from the original bug description:

"app_directory contained some duplicate code even before addition of 'm' option. Addition of that option doubled amount of that code. Worst of all, there are minor differences between these code block and bugs caused by these differences.

1. There is a memory leak. In the 'menu' mode, result of the convert(pos) function is not freed while it should be.
2. In the 'menu' mode check for OPT_LISTBYFIRSTNAME flag ('f' option) is not negated as result, application works in the mode opposite to what user expect (checking last name when user wants the first nd vice versa).
3. select_item function plays message for user using res = func1() || func2() || func3()... construct. This construct loses the actual value returned by ast_waitstream() for example so at the end, res does not contain digit user dialed while listening to the message.
4. (also in 1.4) application announces entries from voicemail.conf/realtime separately from entries from users.conf. I see no reason why doing so instead of building combined list.
5. Alot of duplicated code as already mentioned."

This was tested by dimas and I (I tested under valgrind). A word of caution: any bug fixes that happen
in app_directory in 1.4 will almost certainly not merge cleanly into trunk as a result of this, but it is
well worth it. 

Huge thanks to dimas for this wonderful submission.

(closes issue #11744)
Reported by: dimas
Patches:
      dir3.patch uploaded by dimas (license 88)
	  Tested by: putnopvut, dimas


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@98888 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-01-14 22:11:50 +00:00
Russell Bryant f82c42a22e Resolve compiler warnings.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91193 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 17:44:59 +00:00
Tilghman Lesher d226c1d637 Added multiple name listing. (Closes issue #10413)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@91172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-12-05 16:25:52 +00:00
Luigi Rizzo ea2c54859d more removal of redundant headers
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-22 02:07:33 +00:00
Luigi Rizzo a23c055c3d move asterisk/paths.h outside asterisk.h and into those files
who really need it.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89466 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-20 23:16:15 +00:00
Luigi Rizzo ffd86fc964 more errno.h removal
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89432 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-19 21:12:08 +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
Luigi Rizzo 7f8ecd2cd3 make the 'name' and 'value' fields in ast_variable const char *
This prevents modifying the strings in the stored variables, 
and catched a few instances where this was actually done.

Given the differences between trunk and 1.4 (and the fact that this
is effectively an API change) it is better to fix 1.4 independently.
These are

chan_sip.c::sip_register()
chan_skinny.c:: near line 2847
config.c:: near line 1774
logger.c::make_components()
res_adsi.c:: near line 1049

I may have missed some instances for modules that do not build here.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89268 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-11-14 13:18:40 +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 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
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
Tilghman Lesher 20bbd09de3 Mostly cleanup of documentation to substitute the pipe with the comma, but a few other formatting cleanups, too.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@77808 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2007-07-31 01:10:47 +00:00