Commit Graph

153 Commits

Author SHA1 Message Date
Joshua Colp 02be50b1ac Add support for a realtime sorcery module.
This change does the following:

1. Adds the sorcery realtime module
2. Adds unit tests for the sorcery realtime module
3. Changes the realtime core to use an ast_variable list instead of variadic arguments
4. Changes all realtime drivers to accept an ast_variable list

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386731 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-27 12:01:29 +00:00
Matthew Jordan 2d1cbb4311 Clean up memory leak in config file on off nominal paths when glob is allowed
If a system allows for its usage, Asterisk will use glob to help parse
Asterisk .conf files. The config file loading routine was leaking the memory
allocated by the glob() routine when the config file was in an unmodified
or invalid state.

This patch properly calls globfree in those off nominal paths.

(closes issue ASTERISK-21412)
Reported by: Corey Farrell
patches:
  config_glob_leak.patch uploaded by Corey Farrell (license 5909)
........

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

Merged revisions 386677 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@386685 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-26 21:34:16 +00:00
Matthew Jordan 89f9e077d7 Prevent crashes from occurring when reading from data sources with large values
When reading configuration data from an Asterisk .conf file or when pulling
data from an Asterisk RealTime backend, Asterisk was copying the data on the
stack for manipulation. Unfortunately, it is possible to read configuration
data or realtime data from some data source that provides a large blob of
characters. This could potentially cause a crash via a stack overflow.

This patch prevents large sets of data from being read from an ARA backend or
from an Asterisk conf file.

(issue ASTERISK-20658)
Reported by: wdoekes
Tested by: wdoekes, mmichelson
patches:
 * issueA20658_dont_process_overlong_config_lines.patch uploaded by wdoekes (license 5674)
 * issueA20658_func_realtime_limit.patch uploaded by wdoekes (license 5674)
........

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

Merged revisions 378376 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378377 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-01-02 22:10:32 +00:00
Richard Mudgett f9cc7a15ad Cleanup config cache on exit.
(issue ASTERISK-20649)
Reported by: Corey Farrell
Patches:
      config-cleanup-all.patch (license #5909) patch uploaded by Corey Farrell
........

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

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

Merged revisions 377106 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@377107 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-12-03 19:33:06 +00:00
Mark Michelson 89a5ff859d Add scoped locks to Asterisk.
With the SCOPED_LOCK macro, you can create a variable
that locks a specific lock and unlocks the lock when the
variable goes out of scope. This is useful for situations
where many breaks, continues, returns, or other interruptions
would require separate unlock statements. With a scoped lock,
these aren't necessary.

There are specializations for mutexes, read locks, write locks,
ao2 locks, ao2 read locks, ao2 write locks, and channel locks.
Each of these is a SCOPED_LOCK at heart though.

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371582 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-21 19:04:32 +00:00
Terry Wilson 69dc8e3adb Handle integer over/under-flow in ast_parse_args
The strtol family of functions will return *_MIN/*_MAX on overflow. To
detect when an overflow has happened, errno must be set to 0 before
calling the function, then checked afterward.

(closes issue ASTERISK-20120)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2073/
........

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

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

Merged revisions 371399 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@371400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-08-16 23:08:40 +00:00
Kinsey Moore 9b16c8b0f6 Clean up and ensure proper usage of alloca()
This replaces all calls to alloca() with ast_alloca() which calls gcc's
__builtin_alloca() to avoid BSD semantics and removes all NULL checks
on memory allocated via ast_alloca() and ast_strdupa().

(closes issue ASTERISK-20125)
Review: https://reviewboard.asterisk.org/r/2032/
Patch-by: Walter Doekes (wdoekes)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-31 20:21:43 +00:00
Jonathan Rose 10afdf3a2a Named ACLs: Introduces a system for creating and sharing ACLs
This patch adds Named ACL functionality to Asterisk. This allows system
administrators to define an ACL and refer to it by a unique name. Configurable
items can then refer to that name when specifying access control lists.
It also includes updates to all core supported consumers of ACLs. That includes
manager, chan_sip, and chan_iax2. This feature is based on the deluxepine-trunk
by Olle E. Johansson and provides a subset of the Named ACL functionality
implemented in that branch. For more information on this feature, see acl.conf
and/or the Asterisk wiki.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-07-11 18:33:36 +00:00
Kevin P. Fleming 166b4e2b30 Multiple revisions 369001-369002
........
  r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
  
  Add support-level indications to many more source files.
  
  Since we now have tools that scan through the source tree looking for files
  with specific support levels, we need to ensure that every file that is
  a component of a 'core' or 'extended' module (or the main Asterisk binary)
  is explicitly marked with its support level. This patch adds support-level
  indications to many more source files in tree, but avoids adding them to
  third-party libraries that are included in the tree and to source files
  that don't end up involved in Asterisk itself.
........
  r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
  
  Add a script to enable finding source files without support-levels defined.
........

Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-15 16:20:16 +00:00
Mark Michelson 14a985560e Merge changes dealing with support for Digium phones.
Presence support has been added. This is accomplished by
allowing for presence hints in addition to device state
hints. A dialplan function called PRESENCE_STATE has been
added to allow for setting and reading presence. Presence
can be transmitted to Digium phones using custom XML
elements in a PIDF presence document.

Voicemail has new APIs that allow for moving, removing,
forwarding, and playing messages. Messages have had a new
unique message ID added to them so that the APIs will work
reliably. The state of a voicemail mailbox can be obtained
using an API that allows one to get a snapshot of the mailbox.
A voicemail Dialplan App called VoiceMailPlayMsg has been
added to be able to play back a specific message.

Configuration hooks have been added. Configuration hooks
allow for a piece of code to be executed when a specific
configuration file is loaded by a specific module. This is
useful for modules that are dependent on the configuration
of other modules.

chan_sip now has a public method that allows for a custom
SIP INFO request to be sent mid-dialog. Digium phones use
this in order to display progress bars when files are played.

Messaging support has been expanded a bit. The main
visible difference is the addition of an AMI action
MessageSend.

Finally, a ParkingLots manager action has been added in order
to get a list of parking lots.



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-04 20:26:12 +00:00
Terry Wilson d54717c39e Add new config-parsing framework
This framework adds a way to register the various options in a config
file with Asterisk and to handle loading and reloading of that config
in a consistent and atomic manner.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-06-01 16:33:25 +00:00
Matthew Jordan 7b51320642 Fix a variety of memory leaks
This patch addresses a number of memory leaks in a variety of modules that were
found by a static analysis tool.  A brief summary of the changes:

* app_minivm:       free ast_str objects on off nominal paths
* app_page:         free the ast_dial object if the requested channel technology
                    cannot be appended to the dialing structure
* app_queue:        if a penalty rule failed to match any existing rule list
                    names, the created rule would not be inserted and its memory
                    would be leaked
* app_read:         dispose of the created silence detector in the presence of
                    off nominal circumstances
* app_voicemail:    dispose of an allocated unique ID field for MWI event
                    un-subscribe requests in off nominal paths; dispose of
                    configuration objects when using the secret.conf option
* chan_dahdi:       dispose of the allocated frame produced by ast_dsp_process
* chan_iax2:        properly unref peer in CLI command "iax2 unregister"
* chan_sip:         dispose of the allocated frame produced by sip_rtp_read's
                    call of ast_dsp_process; free memory in parse unit tests
* func_dialgroup:   properly deref ao2 object grhead in nominal path of
                    dialgroup_read
* func_odbc:        free resultset in off nominal paths of odbc_read
* cli:              free match_list in off nominal paths of CLI match completion
* config:           free comment_buffer/list_buffer when configuration file load
                    is unchanged; free the same buffers any time they were
                    created and config files were processed
* data:             free XML nodes in various places
* enum:             free context buffer in off nominal paths
* features:         free ast_call_feature in off nominal paths of applicationmap
                    config processing
* netsock2:         users of ast_sockaddr_resolve pass in an ast_sockaddr struct
                    that is allocated by the method.  Failures in
                    ast_sockaddr_resolve could result in the users of the method
                    not knowing whether or not the buffer was allocated.  The
                    method will now not allocate the ast_sockaddr struct if it
                    will return failure.
* pbx:              cleanup hash table traversals in off nominal paths; free
                    ignore pattern buffer if it already exists for the specified
                    context
* xmldoc:           cleanup various nodes when we no longer need them
* main/editline:    various cleanup of pointers not being freed before being
                    assigned to other memory, cleanup along off nominal paths
* menuselect/mxml:  cleanup of value buffer for an attribute when that attribute
                    did not specify a value
* res_calendar*:    responses are allocated via the various *_request method
                    returns and should not be allocated in the various
                    write_event methods; ensure attendee buffer is freed if no
                    data exists in the parsed node; ensure that calendar objects
                    are de-ref'd appropriately
* res_jabber:       free buffer in off nominal path
* res_musiconhold:  close the DIR* object in off nominal paths
* res_rtp_asterisk: if we run out of ports, close the rtp socket object and free
                    the rtp object
* res_srtp:         if we fail to create the session in libsrtp, destroy the
                    temporary ast_srtp object

(issue ASTERISK-19665)
Reported by: Matt Jordan

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-18 14:43:44 +00:00
Kinsey Moore dd81b047db Resolve FORWARD_NULL static analysis warnings
This resolves core findings from ASTERISK-19650 numbers 0-2, 6, 7, 9-11, 14-20,
22-24, 28, 30-32, 34-36, 42-56, 82-84, 87, 89-90, 93-102, 104, 105, 109-111,
and 115. Finding numbers 26, 33, and 29 were already resolved.  Those skipped
were either extended/deprecated or in areas of code that shouldn't be
disturbed.

(Closes issue ASTERISK-19650)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366169 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-10 20:56:09 +00:00
Kinsey Moore 781f4657b9 Fix many issues from the NULL_RETURNS Coverity report
Most of the changes here are trivial NULL checks.  There are a couple
optimizations to remove the need to check for NULL and outboundproxy parsing
in chan_sip.c was rewritten to avoid use of strtok.  Additionally, a bug was
found and fixed with the parsing of outboundproxy when "outboundproxy=," was
set.

(Closes issue ASTERISK-19654)
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@365400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-05-04 22:17:38 +00:00
Terry Wilson f7c174ff84 Multiple revisions 364365,364369
........
  r364365 | twilson | 2012-04-27 17:31:01 -0500 (Fri, 27 Apr 2012) | 11 lines
  
  Fix ast_parse_arg numeric type range checking and add tests
  
  ast_parse_arg wasn't checking for strto* parse errors or limiting
  the results by the actual range of the numeric types. This patch fixes
  that and adds unit tests as well.
  
  Review: https://reviewboard.asterisk.org/r/1879/
  ........
  
  Merged revisions 364340 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........
  r364369 | twilson | 2012-04-27 17:33:10 -0500 (Fri, 27 Apr 2012) | 2 lines
  
  Add missing test_config.c
........

Merged revisions 364365,364369 from http://svn.asterisk.org/svn/asterisk/branches/10


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@364397 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-04-27 22:54:20 +00:00
Kinsey Moore c5b3db1956 Kill off red blobs in most of main/*
Everything still compiled after making these changes, so I assume these
whitespace-only changes didn't break anything (and shouldn't have).


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@360190 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-03-22 19:51:16 +00:00
Tilghman Lesher a78b0af5ea Re-commit the verbose branch.
This change permits each verbose destination (consoles, logger) to have its
own concept of what the verbosity level is.  The big feature here is that
the logger will now be able to capture a particular verbosity level without
condemning each console to need to suffer that level of verbosity.
Additionally, a stray 'core set verbose' will no longer change what will go
to the log.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@355413 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-14 20:27:16 +00:00
Kinsey Moore 25e344168e Make the config parser remove escaping backslashes
The config parser in Asterisk does not currently remove a backslash that is
used to escape a semicolon which would otherwise be interpreted as the start
of a comment.

The change here causes that backslash to be removed, but does not create a
real escape system in the config parser.  The biggest complication with a real
escape system would be breaking existing configs everywhere (parsing \\ as \
and breaking on escaped non-semicolon characters) even though it would be the
"right" way to do things.

(closes issue ASTERISK-17121)
Review: https://reviewboard.asterisk.org/r/1724/
........

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@354657 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2012-02-09 19:54:37 +00:00
Matthew Jordan 9057aa20b6 Backed out core changes from r346391
During testing, it was discovered that there were a number of side effects
introduced by r346391 and subsequent check-ins related to it (r346429,
r346617, and r346655).  This included the /main/stdtime/ test 'hanging',
as well as the remote console option failing to receive the appropriate output
after a period of time.

I only backed out the changes to main/ and utils/, as this was adequate
to reverse the behavior experienced.

(issue ASTERISK-18974)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@347997 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-12-12 19:35:08 +00:00
Tilghman Lesher 56b21b4683 Remove the few places where we try to ast_verbose() without a newline.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@346655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-30 23:38:34 +00:00
Paul Belanger 298d015828 Add #tryinclude statement
This provides the same functionality as #include however an asterisk module will
still load if the filename does not exist.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@345735 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-21 16:40:17 +00:00
Walter Doekes b41b49ea0e Several fixes to the chan_sip dynamic realtime peer/user lookup
There were several problems with the dynamic realtime peer/user lookup
code. The lookup logic had become rather hard to read due to lots of
incremental changes to the realtime_peer function. And, during the
addition of the sipregs functionality, several possibilities for memory
leaks had been introduced. The insecure=port matching has always been
broken for anyone using the sipregs family. And, related, the broken
implementation forced those using sipregs to *still* have an ipaddr
column on their sippeers table.

Thanks Terry Wilson for comprehensive testing and finding and fixing
unexpected behaviour from the multientry realtime call which caused
the realtime_peer to have a completely unused code path.

This changeset fixes the leaks, the lookup inconsistenties and that
you won't need an ipaddr column on your sippeers table anymore (when
you're using sipregs). Beware that when you're using sipregs, peers
with insecure=port will now start matching!

(closes issue ASTERISK-17792)
(closes issue ASTERISK-18356)
Reported by: marcelloceschia, Walter Doekes
Reviewed by: Terry Wilson

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342930 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 21:02:56 +00:00
Walter Doekes 25ee5f83b5 Cleanup references to sipusers and sipfriends dynamic realtime families
Somewhere between 1.4 and 1.8 the sipusers family has become completely
unused. Before that, the sipfriends family had been obsoleted in favor
of separate sipusers and sippeers families. Apparently, they have been
merged back again into a single family which is now called "sippeers".

Reviewed by: irroot, oej, pabelanger

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342871 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-11-01 19:53:26 +00:00
Terry Wilson 700f0a2752 Return NULL when no results returned for realtime_multientry
It was not documented what the return value should be when no entries
were returned with the multientry realtime callback. This change forces
consistent behavior even if the backends return an empty ast_config.

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

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@342225 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-10-25 01:29:32 +00:00
Richard Mudgett 220bf14557 Merged revisions 334297 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r334297 | rmudgett | 2011-09-02 12:15:08 -0500 (Fri, 02 Sep 2011) | 46 lines
  
  Merged revisions 334296 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r334296 | rmudgett | 2011-09-02 12:10:58 -0500 (Fri, 02 Sep 2011) | 39 lines
    
    Fix potential memory allocation failure crashes in config.c.
    
    * Added required checks to the returned memory allocation pointers to
    prevent crashes.
    
    * Made ast_include_rename() create a replacement ast_variable list node if
    the new filename is longer than the available space.  Fixes potential
    crash and memory leak.
    
    * Factored out ast_variable_move() from ast_variable_update() so
    ast_include_rename() can also use it when creating a replacement
    ast_variable list node.
    
    * Made the filename stuffed at the end of the struct a minimum allocated
    size in ast_variable_new() in case ast_include_rename() changes the stored
    filename.
    
    * Constify struct char pointers pointing to strings stuffed at the end of
    the struct for: ast_variable, cache_file_mtime, and ast_config_map.
    
    * Factored out cfmtime_new() to remove inlined code and allow some struct
    pointers to become const.
    
    * Removed the list lock from struct cache_file_mtime that was never used.
    
    * Added doxygen comments to several structure elements and better
    documented what strings are stuffed at the struct end char array.
    
    * Reworked ast_config_text_file_save() and set_fn() to handle allocation
    failure of the include file scratch pad object tracking blank lines.
    
    * Made ast_config_text_file_save() fn[] declared with PATH_MAX to ensure
    it is long enough for any filename with path.  Also reduced the number of
    container fileset buckets from a rediculus 180,000 to 1023.
    
    JIRA AST-618
    
    Review: https://reviewboard.asterisk.org/r/1378/
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@334304 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-09-02 17:19:17 +00:00
Richard Mudgett 76a808ed22 Merged revisions 332940 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332940 | rmudgett | 2011-08-22 16:23:40 -0500 (Mon, 22 Aug 2011) | 14 lines
  
  Merged revisions 332939 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332939 | rmudgett | 2011-08-22 16:22:24 -0500 (Mon, 22 Aug 2011) | 7 lines
    
    Minor code optimizations.
    
    * Simplify ast_category_browse() logic for easier understanding.
    
    * Remove dead code in ast_variable_delete() and simplify some of its
    logic.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332941 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 21:25:11 +00:00
Richard Mudgett b8748f4c00 Merged revisions 332761 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/10

................
  r332761 | rmudgett | 2011-08-22 12:05:35 -0500 (Mon, 22 Aug 2011) | 22 lines
  
  Merged revisions 332759 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.8
  
  ........
    r332759 | rmudgett | 2011-08-22 12:00:03 -0500 (Mon, 22 Aug 2011) | 15 lines
    
    Memory leak reading realtime database variable list.
    
    Calling ast_load_realtime() can leak the last list node if the read list
    only contains empty variable value items.
    
    * Fixed list filter loop in ast_load_realtime() to delete the list node
    immediately instead of the next time through the loop.  The next time
    through the loop may not happen if the node to delete is the last in the
    list.
    
    (issue ASTERISK-18277)
    (issue ASTERISK-18265)
    Patches:
          jira_asterisk_18265_v1.8_config.patch (license #5621) patch uploaded by rmudgett
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@332762 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-08-22 17:12:16 +00:00
Russell Bryant 37aa52fd78 Merged revisions 316265 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

........
  r316265 | russell | 2011-05-03 14:55:49 -0500 (Tue, 03 May 2011) | 5 lines
  
  Fix a bunch of compiler warnings generated by gcc 4.6.0.
  
  Most of these are -Wunused-but-set-variable, but there were a few others
  mixed in here, as well.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@316293 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-05-03 20:45:32 +00:00
Andrew Latham 9f1a17f137 Replacing doc/* with wiki links
Adding links to http(s)://wiki.asterisk.org



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@305799 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-02-02 18:59:29 +00:00
Sean Bright 6abfc32125 Clarify a source comment about configuration template categories.
(closes issue #18578)
Reported by: astmiv
Patches:
      asterisk.main.config.2.patch uploaded by astmiv (license 1189)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@302836 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2011-01-19 23:53:44 +00:00
Jason Parker 7dd1392fba Merged revisions 283882 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r283882 | qwell | 2010-08-27 15:31:55 -0500 (Fri, 27 Aug 2010) | 22 lines
  
  Merged revisions 283881 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2
  
  ................
    r283881 | qwell | 2010-08-27 15:30:27 -0500 (Fri, 27 Aug 2010) | 15 lines
    
    Merged revisions 283880 via svnmerge from 
    https://origsvn.digium.com/svn/asterisk/branches/1.4
    
    ........
      r283880 | qwell | 2010-08-27 15:29:11 -0500 (Fri, 27 Aug 2010) | 8 lines
      
      Fix issue with decoding ^-escaped characters in realtime.
      
      (closes issue #17790)
      Reported by: denzs
      Patches: 
            17790-chunky.diff uploaded by qwell (license 4)
      Tested by: qwell, denzs
    ........
  ................
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@283883 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-08-27 20:32:21 +00:00
Tilghman Lesher 3ab0041118 Merge the realtime failover branch
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278957 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-23 16:19:21 +00:00
Tilghman Lesher b4e18d5660 Add load priority order, such that preload becomes unnecessary in most cases
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@278132 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-20 19:35:02 +00:00
Tilghman Lesher a7c92fad28 Merged revisions 277568 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r277568 | tilghman | 2010-07-16 16:54:29 -0500 (Fri, 16 Jul 2010) | 8 lines
  
  Since we split values at the semicolon, we should store values with a semicolon as an encoded value.
  
  (closes issue #17369)
   Reported by: gkservice
   Patches: 
         20100625__issue17369.diff.txt uploaded by tilghman (license 14)
   Tested by: tilghman
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@277773 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-17 17:39:28 +00:00
Mark Michelson cd4ebd336f Add IPv6 to Asterisk.
This adds a generic API for accommodating IPv6 and IPv4 addresses
within Asterisk. While many files have been updated to make use of the
API, chan_sip and the RTP code are the files which actually support
IPv6 addresses at the time of this commit. The way has been paved for
easier upgrading for other files in the near future, though.

Big thanks go to Simon Perrault, Marc Blanchet, and Jean-Philippe Dionne
for their hard work on this.

(closes issue #17565)
Reported by: russell
Patches: 
      asteriskv6-test-report.pdf uploaded by russell (license 2)

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



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@274783 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-08 22:08:07 +00:00
Paul Belanger 66cd1ad2ec Merged revisions 273884 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r273884 | pabelanger | 2010-07-05 09:51:29 -0400 (Mon, 05 Jul 2010) | 8 lines
  
  Remove extra line breaks from 'core show config mappings'
  
  (closes issue #17583)
  Reported by: pabelanger
  Patches:
        issue17583.patch uploaded by pabelanger (license 224)
  Tested by: lmadsen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273886 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-07-05 13:53:44 +00:00
Tilghman Lesher c8b8c90f99 Don't attempt to proceed if our internal parser indicates an invalid file.
(closes issue #17560)
 Reported by: Nick_Lewis


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@273142 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-30 01:01:14 +00:00
Tilghman Lesher cbc311cd8f Merged revisions 272921-272922 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r272921 | tilghman | 2010-06-28 16:29:27 -0500 (Mon, 28 Jun 2010) | 8 lines
  
  Change the way that we read include files, to accommodate for changes in GCC 4.4.
  
  (closes issue #17472)
   Reported by: seandarcy
   Patches: 
         config2.patch uploaded by nivan (license 1066)
   Tested by: nivan
........
  r272922 | tilghman | 2010-06-28 16:38:49 -0500 (Mon, 28 Jun 2010) | 2 lines
  
  Also trim trailing blanks on #includes
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@272923 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-06-28 21:42:52 +00:00
Sean Bright bb03a2f7d9 Merged revisions 241015 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r241015 | seanbright | 2010-01-18 14:54:19 -0500 (Mon, 18 Jan 2010) | 12 lines
  
  Plug a memory leak when reading configs with their comments.
  
  While reading through configuration files with the intent of returning their
  full contents (comments specifically) we allocated some memory and then forgot
  to free it.  This doesn't fix 16554 but clears up a leak I had in the lab.
  
  (issue #16554)
  Reported by: mav3rick
  Patches:
        issue16554_20100118.patch uploaded by seanbright (license 71)
  Tested by: seanbright
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@241016 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-18 19:57:52 +00:00
Tilghman Lesher c0eb48380a Oops, didn't compile (thanks, kpfleming)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237414 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 19:03:20 +00:00
Tilghman Lesher f2a282ce17 Further reduce the encoded blank values back to blank in the realtime API.
(closes issue #16533)
 Reported by: sergee
 Patches: 
       200100104__issue16533.diff.txt uploaded by tilghman (license 14)
 Tested by: sergee


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@237410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2010-01-04 18:42:10 +00:00
Tilghman Lesher 3093ccb619 Merged revisions 219023 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
  r219023 | tilghman | 2009-09-16 18:21:53 -0500 (Wed, 16 Sep 2009) | 8 lines
  
  Properly deal with quotes in the arguments of '#exec' includes.
  (closes issue #15583)
   Reported by: pkempgen
   Patches: 
         20090726__issue15583.diff.txt uploaded by tilghman (license 14)
         20090726__issue15583-1.4-4.diff.txt uploaded by pkempgen (license 169)
   Tested by: pkempgen
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@219061 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-16 23:42:12 +00:00
Tilghman Lesher 642bec4d6f AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@211539 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:20:57 +00:00
Ryan Brindley ef667f2f82 If we delete the info, lets also delete the lines
(closes issue #14509)
Reported by: timeshell
Patches:
      20090504__bug14509.diff.txt uploaded by tilghman (license 14)
Tested by: awk, timeshell



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@202753 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-23 21:25:17 +00:00
Olle Johansson fa26904074 If there are no realtime engines, there's no reason to check for realtime families
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@176513 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 15:18:55 +00:00
Tilghman Lesher c8223fc957 Merge ast_str_opaque branch (discontinue usage of ast_str internals)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@163991 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-13 08:36:35 +00:00
Eliel C. Sardanons 1e8e12efcf Janitor, use ARRAY_LEN() when possible.
(closes issue #13990)
Reported by: eliel
Patches:
      array_len.diff uploaded by eliel (license 64)



git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161218 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 10:31:25 +00:00
Tilghman Lesher da8069394b The first file should have a blank config filename in the structure, so that
when a save occurs to a different filename, everything goes to the alternate
filename, instead of appending to the original.  This is important for the
AMI command UpdateConfig.
(closes issue #13301)
 Reported by: trevo
 Patches: 
       20081113__bug13301.diff.txt uploaded by Corydon76 (license 14)
       20081113__bug13301__1.6.0.diff.txt uploaded by Corydon76 (license 14)
 Tested by: Corydon76, blitzrage


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@161181 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-12-05 05:41:41 +00:00
Sean Bright fd8caa1778 This is basically a complete rollback of r155401, as it was determined that
it would be best to maintain API compatibility.  Instead, this commit introduces
ao2_callback_data() which is functionally identical to ao2_callback() except
that it allows you to pass arbitrary data to the callback.

Reviewed by Mark Michelson via ReviewBoard:
	http://reviewboard.digium.com/r/64


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158959 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-25 01:01:49 +00:00
Ryan Brindley e27f9325ea more formatting corrections :: one line for loops and if statements still need {}
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@158078 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2008-11-20 17:53:42 +00:00