Commit Graph

1261 Commits

Author SHA1 Message Date
Tilghman Lesher
c0c763be9b Merged revisions 217638 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r217638 | tilghman | 2009-09-10 13:17:14 -0500 (Thu, 10 Sep 2009) | 4 lines
  
  Verify support for wide ODBC character types before using them.
  (closes issue #15870)
   Reported by: nic_bellamy
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@217642 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-10 18:18:39 +00:00
Tzafrir Cohen
7cce857d3c gcc 4.4 fix: union instead of cast
gcc 4.4 has more strict rules for aliasing. It doesn't like a 
struct sockaddr_in pointer pointing to a struct sockaddr. So we make it
a union.

Merged revisions 217445 via svnmerge from 
http://svn.digium.com/svn/asterisk/trunk


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@217518 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-09 20:30:29 +00:00
Tilghman Lesher
91954c4ba4 Merged revisions 217033 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r217033 | tilghman | 2009-09-08 10:30:18 -0500 (Tue, 08 Sep 2009) | 4 lines
  
  Remove what appears to be an unnecessary define.
  (closes issue #15851)
   Reported by: tzafrir
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@217035 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-09-08 15:36:01 +00:00
Gavin Henry
82bb507be9 Merged revisions 211767 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r211767 | ghenry | 2009-08-12 17:00:46 +0100 (Wed, 12 Aug 2009) | 33 lines
  
  Added three new attributes and applied a patch to res_config_ldap.c
  
  attributetype ( AstAccountSubscribeContext
          NAME 'AstAccountSubscribeContext'
          DESC 'Asterisk subscribe context'
          EQUALITY caseIgnoreMatch
          SUBSTR caseIgnoreSubstringsMatch
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
  
  attributetype ( AstAccountIpAddr
          NAME 'AstAccountIpAddr'
          DESC 'Asterisk aaccount IP address'
          EQUALITY caseIgnoreMatch
          SUBSTR caseIgnoreSubstringsMatch
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
  
  attributetype ( AstAccountUserAgent
          NAME 'AstAccountUserAgent'
          DESC 'Asterisk account user context'
          EQUALITY caseIgnoreMatch
          SUBSTR caseIgnoreSubstringsMatch
          SYNTAX 1.3.6.1.4.1.1466.115.121.1.15)
  
  and patch fix_empty_attributes_1.6.1.4_v2.patch 
  
  (closes issue #13725)
  Reported by: macogeek
  Patches:
        fix_empty_attributes_1.6.1.4_v2.patch uploaded by xvisor (license 863)
  Tested by: suretec
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@211775 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-12 16:19:00 +00:00
Tilghman Lesher
07e59f290c AST-2009-005
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@211569 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-08-10 19:30:55 +00:00
David Brooks
029963b5c5 Merged revisions 209098 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r209098 | dbrooks | 2009-07-27 11:33:50 -0500 (Mon, 27 Jul 2009) | 6 lines
  
  Fixing typos. Replaces "recieved" with "received" and "initilize" with "initialize"
  
  (closes issue #15571)
  Reported by: alecdavis
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@209233 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 20:28:28 +00:00
Mark Michelson
5d701b6c79 Merged revisions 209197 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r209197 | mmichelson | 2009-07-27 15:11:42 -0500 (Mon, 27 Jul 2009) | 9 lines
  
  Honor channel's music class when using realtime music on hold.
  
  (closes issue #15051)
  Reported by: alexh
  Patches:
        15051.patch uploaded by mmichelson (license 60)
  Tested by: alexh
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@209199 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-27 20:17:06 +00:00
David Brooks
415d2a3153 Just replacing typos "recieved" with "received".
(closes issue #15360)
Reported by: okrief



git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@208459 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-23 20:45:41 +00:00
Kevin P. Fleming
cffe0f2476 Merged revisions 207680 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r207680 | kpfleming | 2009-07-21 08:28:04 -0500 (Tue, 21 Jul 2009) | 18 lines
  
  Merged revisions 207647 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r207647 | kpfleming | 2009-07-21 08:04:44 -0500 (Tue, 21 Jul 2009) | 12 lines
    
    Ensure that user-provided CFLAGS and LDFLAGS are honored.
    
    This commit changes the build system so that user-provided flags (in ASTCFLAGS
    and ASTLDFLAGS) are supplied to the compiler/linker *after* all flags provided
    by the build system itself, so that the user can effectively override the
    build system's flags if desired. In addition, ASTCFLAGS and ASTLDFLAGS can now
    be provided *either* in the environment before running 'make', or as variable
    assignments on the 'make' command line. As a result, the use of COPTS and LDOPTS
    is no longer necessary, so they are no longer documented, but are still supported
    so as not to break existing build systems that supply them when building Asterisk.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@207684 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-21 13:48:38 +00:00
Russell Bryant
24467ba927 Merged revisions 205120 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r205120 | russell | 2009-07-08 10:17:19 -0500 (Wed, 08 Jul 2009) | 16 lines
  
  Move OpenSSL initialization to a single place, make library usage thread-safe.
  
  While doing some reading about OpenSSL, I noticed a couple of things that
  needed to be improved with our usage of OpenSSL.
  
  1) We had initialization of the library done in multiple modules.  This has now
     been moved to a core function that gets executed during Asterisk startup.
     We already link OpenSSL into the core for TCP/TLS functionality, so this
     was the most logical place to do it.
  
  2) OpenSSL is not thread-safe by default.  However, making it thread safe is
     very easy.  We just have to provide a couple of callbacks.  One callback
     returns a thread ID.  The other handles locking.  For more information,
     start with the "Is OpenSSL thread-safe?" question on the FAQ page of
     openssl.org.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@205147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-07-08 15:29:10 +00:00
Tilghman Lesher
0d6dbd3774 Merged revisions 201904 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r201904 | tilghman | 2009-06-19 10:47:55 -0500 (Fri, 19 Jun 2009) | 4 lines
  
  Fix 2 typos and add support for wide character types.
  Reported by Benny Amorsen via the asterisk-users mailing list.
  http://lists.digium.com/pipermail/asterisk-users/2009-June/233622.html
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@201905 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-19 15:48:37 +00:00
David Vossel
09b65fe917 Merged revisions 201678 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r201678 | dvossel | 2009-06-18 11:37:42 -0500 (Thu, 18 Jun 2009) | 11 lines
  
  fixes some memory leaks and redundant conditions
  
  (closes issue #15269)
  Reported by: contactmayankjain
  Patches:
        patch.txt uploaded by contactmayankjain (license 740)
        memory_leak_stuff.trunk.diff uploaded by dvossel (license 671)
  Tested by: contactmayankjain, dvossel
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@201680 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 16:51:54 +00:00
Russell Bryant
c6c5ca6454 Merged revisions 201610 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r201610 | russell | 2009-06-18 10:27:10 -0500 (Thu, 18 Jun 2009) | 36 lines
  
  Merged revisions 201600 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r201600 | russell | 2009-06-18 10:24:31 -0500 (Thu, 18 Jun 2009) | 29 lines
    
    Fix memory corruption and leakage related reloads of non files mode MoH classes.
    
    For Music on Hold classes that are not files mode, meaning that we are executing
    an application that will feed us audio data, we use a thread to monitor the
    external application and read audio from it.  This thread also makes use of the
    MoH class object.  In the MoH class destructor, we used pthread_cancel() to ask
    the thread to exit.  Unfortunately, the code did not wait to ensure that the
    thread actually went away.  What needed to be done is a pthread_join() to ensure
    that the thread fully cleans up before we proceed.  By adding this one line, we
    resolve two significant problems:
    
      1) Since the thread was never joined, it never fully goes away.  So, on every
         reload of non-files mode MoH, an unused thread was sticking around.
    
      2) There was a race condition here where the application monitoring thread
         could still try to access the MoH class, even though the thread executing
         the MoH reload has already destroyed it.
    
    (issue #15109)
    Reported by: jvandal
    
    (issue #15123)
    Reported by: axisinternet
    
    (issue #15195)
    Reported by: amorsen
    
    (issue AST-208)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@201613 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-18 15:36:11 +00:00
David Vossel
8e2f88caf5 Merged revisions 199743 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r199743 | dvossel | 2009-06-09 11:22:04 -0500 (Tue, 09 Jun 2009) | 11 lines
  
  module load priority
  
  This patch adds the option to give a module a load priority. The value represents the order in which a module's load() function is initialized.  The lower the value, the higher the priority.  The value is only checked if the AST_MODFLAG_LOAD_ORDER flag is set.  If the AST_MODFLAG_LOAD_ORDER flag is not set, the value will never be read and the module will be given the lowest possible priority
  on load.  Since some modules are reliant on a timing interface, the timing modules have been given a high load priorty.
  
  (closes issue #15191)
  Reported by: alecdavis
  Tested by: dvossel
  
  Review: https://reviewboard.asterisk.org/r/262/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@199745 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-06-09 16:33:31 +00:00
Eliel C. Sardanons
166dca480e Merged revisions 198437 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r198437 | eliel | 2009-05-30 21:22:15 -0400 (Sat, 30 May 2009) | 11 lines
  
  Avoid a crash when res_timing_dahdi is unloaded but wasn't properly loaded.
  
  if dahdi_test_timer() fails, timing_funcs_handle remains NULL causing a crash
  when calling ast_unregister_timing_interface() with a NULL pointer.
  
  (closes issue #15234)
  Reported by: eliel
  Patches:
        timing_dahdi1.diff uploaded by eliel (license 64)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@198441 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-31 01:58:53 +00:00
Sean Bright
676eaf42dc Merged revisions 198375 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r198375 | seanbright | 2009-05-30 16:11:33 -0400 (Sat, 30 May 2009) | 13 lines
  
  Properly terminate the receive buffer before sending to iksemel.
  
  aji_io_recv takes the maximum number of bytes to read (instead of the total
  buffer size), so we have to subtract 1 from our buffer size.  Without this, when
  we receive packets that are larger than our buffer, iksemel will choke and
  things get wonky.
  
  (closes issue #15232)
  Reported by: lp0
  Patches:
        05302009_res_jabber.c.patch uploaded by seanbright (license 71)
  Tested by: seanbright, lp0
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@198390 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 20:21:03 +00:00
Sean Bright
3e8686a005 Merged revisions 198371 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r198371 | seanbright | 2009-05-30 15:38:58 -0400 (Sat, 30 May 2009) | 19 lines
  
  Merged revisions 198370 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r198370 | seanbright | 2009-05-30 15:36:20 -0400 (Sat, 30 May 2009) | 12 lines
    
    Properly terminate AMI JabberSend response messages.
    
    The response message (either Error or Success) needs an extra trailing \r\n
    after the fields to inform the client that the message is complete.
    
    (closes issue #14876)
    Reported by: srt
    Patches:
          05302009_1.4_res_jabber.c.diff uploaded by seanbright (license 71)
          asterisk_14876.patch uploaded by srt (license 378)
          trunk-14876-2.diff uploaded by phsultan (license 73)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@198373 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 19:40:59 +00:00
Russell Bryant
66f4f7834d Merged revisions 198312 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r198312 | russell | 2009-05-29 22:43:23 -0500 (Fri, 29 May 2009) | 12 lines
  
  Merged revisions 198311 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r198311 | russell | 2009-05-29 22:42:46 -0500 (Fri, 29 May 2009) | 5 lines
    
    Fix a crash that occurred when MWI SMDI messages expired.
    
    (closes issue #14561)
    Reported by: cmoss28
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@198314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-30 03:49:57 +00:00
Russell Bryant
08678cf81a Merged revisions 198183 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r198183 | russell | 2009-05-29 17:33:31 -0500 (Fri, 29 May 2009) | 2 lines
  
  Improve handling of trying to ACK too many timer expirations.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@198184 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 22:34:12 +00:00
Russell Bryant
c99a0cf74a Merged revisions 198146 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r198146 | russell | 2009-05-29 15:06:59 -0500 (Fri, 29 May 2009) | 38 lines
  
  Resolve issues with choppy sound when using res_timing_pthread.
  
  The situation that caused this problem was when continuous mode was being
  turned on and off while a rate was set for a timing interface.  A very easy
  way to replicate this bug was to do a Playback() from behind a Local channel.
  In this scenario, a rate gets set on the channel for doing file playback.
  At the same time, continuous mode gets turned on and off about every 20 ms
  as frames get queued on to the PBX side channel from the other side of the
  Local channel.
  
  Essentially, this module treated continuous mode and a set rate as mutually
  exclusive states for the timer to be in.  When I dug deep enough, I observed
  the following pattern:
  
     1) Set timer to tick every 20 ms.
     2) Wait almost 20 ms ...
     3) Continuous mode gets turned on for a queued up frame
     4) Continuous mode gets turned off
     5) The timer goes back to its tick per 20 ms. state but starts counting
        at 0 ms.
     6) Goto step 2.
  
  Sometimes, res_timing_pthread would make it 20 ms and produce a timer tick,
  but not most of the time.  This is what produced the choppy sound (or sometimes
  no sound at all).
  
  Now, the module treats continuous mode and a set rate as completely independent
  timer modes.  They can be enabled and disabled independently of each other and
  things work as expected.
  
  
  (closes issue #14412)
  Reported by: dome
  Patches:
        issue14412.diff.txt uploaded by russell (license 2)
        issue14412-1.6.1.0.diff.txt uploaded by russell (license 2)
  Tested by: DennisD, russell
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@198147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 20:11:00 +00:00
Russell Bryant
d37e398787 Merged revisions 197960 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r197960 | russell | 2009-05-29 11:15:30 -0500 (Fri, 29 May 2009) | 2 lines
  
  Trim trailing whitespace so that I can work on this bug without it bothering me.  :-)
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@197969 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-29 16:19:55 +00:00
Russell Bryant
8716bb7b20 Merged revisions 196843 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r196843 | russell | 2009-05-26 13:20:57 -0500 (Tue, 26 May 2009) | 16 lines
  
  Merged revisions 196826 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r196826 | russell | 2009-05-26 13:14:36 -0500 (Tue, 26 May 2009) | 9 lines
    
    Resolve a file handle leak.
    
    The frames here should have always been freed.  However, out of luck, there was
    never any memory leaked.  However, after file streams became reference counted,
    this code would leak the file stream for the file being read.
    
    (closes issue #15181)
    Reported by: jkroon
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@196869 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-26 18:30:04 +00:00
Tilghman Lesher
20cc5ff46e Recorded merge of revisions 195370 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r195370 | tilghman | 2009-05-18 15:52:33 -0500 (Mon, 18 May 2009) | 15 lines
  
  Recorded merge of revisions 195366 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r195366 | tilghman | 2009-05-18 15:24:13 -0500 (Mon, 18 May 2009) | 8 lines
    
    Add a similar dependency on SMDI for voicemail as already exists for ADSI.
    (closes issue #14846)
     Reported by: pj
     Patches: 
           20090413__bug14846__1.4.diff.txt uploaded by tilghman (license 14)
           20090507__issue14846__1.6.0.diff.txt uploaded by tilghman (license 14)
           20090507__issue14846__1.6.1.diff.txt uploaded by tilghman (license 14)
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@195372 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-18 20:54:29 +00:00
Tilghman Lesher
2497320ba8 Recorded merge of revisions 192171 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r192171 | tilghman | 2009-05-04 14:29:13 -0500 (Mon, 04 May 2009) | 8 lines
  
  Restore 'asyncagi break' command to 1.6.1 and higher.
  (closes issue #14985)
   Reported by: nikkk
   Patches: 
         20090428__bug14985.diff.txt uploaded by tilghman (license 14)
         20090429__bug14985__1.6.1.diff.txt uploaded by tilghman (license 14)
   Tested by: nikkk
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@192172 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-05-04 19:30:34 +00:00
Russell Bryant
5cb6f653e9 Merged revisions 190663 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r190663 | russell | 2009-04-27 14:08:12 -0500 (Mon, 27 Apr 2009) | 22 lines

Merged revisions 190661-190662 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r190661 | russell | 2009-04-27 14:00:54 -0500 (Mon, 27 Apr 2009) | 9 lines

Resolve a crash in res_smdi when used with chan_dahdi.

When chan_dahdi goes to get an SMDI message, it provides no search criteria.
It just grabs the next message that arrives.  This code was written with the
SMDI dialplan functions in mind, since that is now the preferred method of
using SMDI.  However, this broke support of it being used from chan_dahdi.

(closes AST-212)

........
r190662 | russell | 2009-04-27 14:03:59 -0500 (Mon, 27 Apr 2009) | 2 lines

Fix a typo from 190661.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@190665 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-27 19:11:10 +00:00
Sean Bright
89d68f3c94 Merged revisions 189464 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r189464 | seanbright | 2009-04-20 17:09:59 -0400 (Mon, 20 Apr 2009) | 20 lines
  
  Merged revisions 189462 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r189462 | seanbright | 2009-04-20 16:58:39 -0400 (Mon, 20 Apr 2009) | 13 lines
    
    Properly handle @s within hints in AEL.
    
    AEL was not handling the case of a device hint containing an @ symbol, which
    caused parking hints (e.g. hint(park:exten@context)) to error out the parser.
    This patch makes AEL treat the @ the same way it treats colon and ampersand
    now, meaning the characters are included in verbatim.
    
    (closes issue #14941)
    Reported by: bpgoldsb
    Patches:
          bug14941.patch uploaded by seanbright (license 71)
    Tested by: bpgoldsb
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@189531 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-20 21:34:35 +00:00
Mark Michelson
fa01f5b0b1 Merged revisions 188102 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r188102 | mmichelson | 2009-04-13 14:31:48 -0500 (Mon, 13 Apr 2009) | 5 lines
  
  Fix another crash related to cached realtime music on hold.
  
  This was another off-by-one problem caused by moh_register.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@188104 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-13 19:33:04 +00:00
Mark Michelson
b8318ad040 Merged revisions 187421,187424 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r187421 | mmichelson | 2009-04-09 12:30:39 -0500 (Thu, 09 Apr 2009) | 21 lines
  
  Fix a crash in res_musiconhold when using cached realtime moh.
  
  The moh_register function links an mohclass and then immediately
  unrefs the class since the container now has a reference. The problem
  with using realtime music on hold is that the class is allocated,
  registered, and started in one fell swoop. The refcounting logic 
  resulted in the count being off by one. The same problem did not
  happen when using a static config because the allocation and registration
  of an mohclass is a separate operation from starting moh. This also did
  not affect non-cached realtime moh because the classes are not registered
  at all.
  
  I also have modified res_musiconhold to use the _t_ variants of the ao2_
  functions so that more info can be gleaned when attempting to trace the
  refcounts. I found this to be incredibly helpful for debugging this issue
  and there's no good reason to remove it.
  
  (closes issue #14661)
  Reported by: sum
........
  r187424 | mmichelson | 2009-04-09 12:34:39 -0500 (Thu, 09 Apr 2009) | 3 lines
  
  Use safe macro practices even though they really aren't necessary.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@187427 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-09 17:43:20 +00:00
Mark Michelson
2e1a3be9e4 Merged revisions 187046 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r187046 | mmichelson | 2009-04-08 11:52:20 -0500 (Wed, 08 Apr 2009) | 16 lines
  
  Merged revisions 187045 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r187045 | mmichelson | 2009-04-08 11:52:03 -0500 (Wed, 08 Apr 2009) | 10 lines
    
    Fix a small logical error when loading moh classes.
    
    We were unconditionally incrementing the number of mohclasses
    registered. However, we should actually only increment if the
    call to moh_register was successful.
    
    While this probably has never caused problems, I noticed it
    and decided to fix it anyway.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@187048 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-04-08 16:53:26 +00:00
Joshua Colp
de17404c12 Merged revisions 184673 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r184673 | file | 2009-03-27 12:46:46 -0300 (Fri, 27 Mar 2009) | 7 lines
  
  Fix speech structure leak in the AGI speech recognition integration.
  
  The AGI dialplan applications did not destroy the speech structure automatically
  if it was not destroyed by the running AGI script. They will now do this.
  
  (issue LUMENVOX-15) 
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@184675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 15:54:22 +00:00
Russell Bryant
e98905628a Merged revisions 184630 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r184630 | russell | 2009-03-27 09:00:18 -0500 (Fri, 27 Mar 2009) | 2 lines

Change g_eid to ast_eid_default.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@184631 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-27 14:04:56 +00:00
Russell Bryant
429e148ebf Merged revisions 184339 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r184339 | russell | 2009-03-25 16:57:19 -0500 (Wed, 25 Mar 2009) | 35 lines

Improve performance of the ast_event cache functionality.

This code comes from svn/asterisk/team/russell/event_performance/.

Here is a summary of the changes that have been made, in order of both
invasiveness and performance impact, from smallest to largest.

1) Asterisk 1.6.1 introduces some additional logic to be able to handle
   distributed device state.  This functionality comes at a cost.
   One relatively minor change in this patch is that the extra processing
   required for distributed device state is now completely bypassed if
   it's not needed.

2) One of the things that I noticed when profiling this code was that a
   _lot_ of time was spent doing string comparisons.  I changed the way
   strings are represented in an event to include a hash value at the front.
   So, before doing a string comparison, we do an integer comparison on the
   hash.

3) Finally, the code that handles the event cache has been re-written.
   I tried to do this in a such a way that it had minimal impact on the API.
   I did have to change one API call, though - ast_event_queue_and_cache().
   However, the way it works now is nicer, IMO.  Each type of event that
   can be cached (MWI, device state) has its own hash table and rules for
   hashing and comparing objects.  This by far made the biggest impact on
   performance.

For additional details regarding this code and how it was tested, please see the
review request.

(closes issue #14738)
Reported by: russell

Review: http://reviewboard.digium.com/r/205/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@184342 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-25 22:02:20 +00:00
Mark Michelson
36cd2b9a50 Merged revisions 183766 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r183766 | mmichelson | 2009-03-23 13:58:03 -0500 (Mon, 23 Mar 2009) | 13 lines
  
  Merged revisions 183700 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r183700 | mmichelson | 2009-03-23 12:59:28 -0500 (Mon, 23 Mar 2009) | 7 lines
    
    Fix a memory leak in res_monitor.c
    
    The only way that this leak would occur is if Monitor were started
    using the Manager interface and no File: header were given. Discovered
    while reviewing the ast_channel_ao2 review request.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@183768 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-23 18:59:30 +00:00
Russell Bryant
baab6e74b9 Merged revisions 182847 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r182847 | russell | 2009-03-17 21:28:55 -0500 (Tue, 17 Mar 2009) | 52 lines

Merged revisions 182810 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r182810 | russell | 2009-03-17 21:09:13 -0500 (Tue, 17 Mar 2009) | 44 lines

Fix cases where the internal poll() was not being used when it needed to be.

We have seen a number of problems caused by poll() not working properly on 
Mac OSX.  If you search around, you'll find a number of references to using 
select() instead of poll() to work around these issues.  In Asterisk, we've 
had poll.c which implements poll() using select() internally.  However, we 
were still getting reports of problems.

vadim investigated a bit and realized that at least on his system, even 
though we were compiling in poll.o, the system poll() was still being used.  
So, the primary purpose of this patch is to ensure that we're using the 
internal poll() when we want it to be used.

The changes are:

1) Remove logic for when internal poll should be used from the Makefile.  
   Instead, put it in the configure script.  The logic in the configure 
   script is the same as it was in the Makefile.  Ideally, we would have 
   a functionality test for the problem, but that's not actually possible, 
   since we would have to be able to run an application on the _target_ 
   system to test poll() behavior.

2) Always include poll.o in the build, but it will be empty if AST_POLL_COMPAT
   is not defined.

3) Change uses of poll() throughout the source tree to ast_poll().  I feel 
   that it is good practice to give the API call a new name when we are 
   changing its behavior and not using the system version directly in all cases.
   So, normally, ast_poll() is just redefined to poll().  On systems where 
   AST_POLL_COMPAT is defined, ast_poll() is redefined to ast_internal_poll().

4) Change poll() in main/poll.c to be ast_internal_poll().

It's worth noting that any code that still uses poll() directly will work fine 
(if they worked fine before).  So, for example, out of tree modules that are 
using poll() will not stop working or anything.  However, for modules to work 
properly on Mac OSX, ast_poll() needs to be used.

(closes issue #13404)
Reported by: agalbraith
Tested by: russell, vadim

http://reviewboard.digium.com/r/198/

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@182946 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-18 14:32:47 +00:00
Joshua Colp
b8fe92d820 Merged revisions 181665 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r181665 | file | 2009-03-12 13:56:58 -0300 (Thu, 12 Mar 2009) | 9 lines
  
  Merged revisions 181664 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r181664 | file | 2009-03-12 13:56:20 -0300 (Thu, 12 Mar 2009) | 2 lines
    
    Fix incorrect usage of strncasecmp... I really meant to use strcasecmp.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@181667 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12 16:58:22 +00:00
Joshua Colp
8f0c3cdf7b Merged revisions 181661 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r181661 | file | 2009-03-12 13:53:52 -0300 (Thu, 12 Mar 2009) | 19 lines
  
  Merged revisions 181659-181660 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r181659 | file | 2009-03-12 13:50:37 -0300 (Thu, 12 Mar 2009) | 8 lines
    
    Fix another scenario where depending on configuration the stream would not get read.
    
    For custom commands we don't know whether the audio is coming from a stream or not
    so we are going to have to read the data despite no channels.
    
    (closes issue #14416)
    Reported by: caspy
  ........
    r181660 | file | 2009-03-12 13:52:45 -0300 (Thu, 12 Mar 2009) | 2 lines
    
    Fix logic flaw in previous commit.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@181663 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12 16:55:17 +00:00
Joshua Colp
9be7a5d093 Merged revisions 181656 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r181656 | file | 2009-03-12 13:32:20 -0300 (Thu, 12 Mar 2009) | 17 lines
  
  Merged revisions 181655 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r181655 | file | 2009-03-12 13:29:19 -0300 (Thu, 12 Mar 2009) | 10 lines
    
    Fix issue with streaming MOH failing if nobody is listening.
    
    When a music class is setup to actually provide music on hold
    from a stream we need to constantly read audio from it since it
    will constantly be providing audio. This is now done despite there
    being no channels listening to it.
    
    (closes issue #14416)
    Reported by: caspy
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@181658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-12 16:34:41 +00:00
Mark Michelson
1638e2cefc Merged revisions 179937 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r179937 | mmichelson | 2009-03-03 14:59:16 -0600 (Tue, 03 Mar 2009) | 20 lines
  
  Add documentation for timing modules used in Asterisk
  
  This document specifies the timing modules available in Asterisk beginning
  with Asterisk 1.6.1. The document goes into detail about the differences
  between each and gives a general overview of what timing is used for in
  Asterisk. There is also a section which can be used to help customize
  your setup or to troubleshoot timing issues you may have.
  
  I also added messages to the DAHDI timing test used in res_timing_dahdi.c
  that points to this new documentation if people experience problems.
  
  Big thanks to all who contributed comments on this.
  
  (closes issue #14490)
  Reported by: mmichelson
  Patches:
        timing.txt uploaded by mmichelson (license 60)
  
  Review: http://reviewboard.digium.com/r/164/
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@179939 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-03-03 21:00:46 +00:00
Russell Bryant
807d567eda Merged revisions 179164 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r179164 | russell | 2009-02-27 15:47:18 -0600 (Fri, 27 Feb 2009) | 2 lines

Mark res_ais as experimental, as the binary event format is subject to change.

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@179166 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-27 21:48:00 +00:00
Steve Murphy
f72d04de72 Merged revisions 177286 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r177286 | murf | 2009-02-18 16:50:57 -0700 (Wed, 18 Feb 2009) | 39 lines
  
  Merged revisions 177225 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r177225 | murf | 2009-02-18 15:43:14 -0700 (Wed, 18 Feb 2009) | 34 lines
    
    This patch fixes a regression of sorts that was introduced in 
    rev 24425.
    
    It basically fixes AST-190/ABE-1782.
    
    What was wrong: the user has 6000 extensions in one context; and
    then 6000 contexts, one per extension. The parser could only handle
    about 4893 of the 6000 extens in the single context.
    
    This was due to the regression I mentioned. To get rid of
    shift/reduce conflicts, Luigi set up right-recursive lists
    for globals, context elements, switch lists, and statements.
    Right recursive lists got rid of the warnings, but instead, they
    use up a tremendous amount of stack space when the lists are long.
    
    I saw this a few years back, and resolved not to fix it until
    someone complained. That day has arrived!
    
    After the changes were made, I ran the regression test suite,
    and there were no problems.
    
    I took the test case the user provided, and added 100,000 
    extensions to the single context, that already had 6,000 extens
    in it. (I'll see your 6, and raise you 100!) It takes a few minutes
    to read it all in, check it and generate code for it, but no
    problems.
    
    So, I think I can say that fundamentally, there are no longer
    any limits on the number of items you can place in contexts,
    statement blocks, switches, or globals, beyond your virt mem
    constraints.
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@177294 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-19 00:17:44 +00:00
Russell Bryant
18b14510f2 Merged revisions 176666 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r176666 | russell | 2009-02-17 15:22:40 -0600 (Tue, 17 Feb 2009) | 16 lines

Update the timing API to have better support for multiple timing interfaces.

1) Add module use count handling so that timing modules can be unloaded.

2) Implement unload_module() functions for the timing interface modules.

3) Allow multiple timing modules to be loaded, and use the one with the
   highest priority value.

4) Report which timing module is being use in the "timing test" CLI command.

(closes issue #14489)
Reported by: russell

Review: http://reviewboard.digium.com/r/162/

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@176675 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 21:24:17 +00:00
Tilghman Lesher
75ff7a609d Merged revisions 176592,176642 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r176592 | tilghman | 2009-02-17 12:49:20 -0600 (Tue, 17 Feb 2009) | 4 lines
  
  Add assertions in the quest to track down a refcount leak.
  (closes issue #14485)
   Reported by: davevg
........
  r176642 | tilghman | 2009-02-17 15:14:18 -0600 (Tue, 17 Feb 2009) | 8 lines
  
  Prior to masquerade, move the group definitions to the channel performing the
  masq, so that the group count lingers past the bridge.
  (closes issue #14275)
   Reported by: kowalma
   Patches: 
         20090216__bug14275.diff.txt uploaded by Corydon76 (license 14)
   Tested by: kowalma
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@176644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-17 21:16:53 +00:00
Joshua Colp
90b3566d84 Merged revisions 174219 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r174219 | file | 2009-02-09 10:49:24 -0400 (Mon, 09 Feb 2009) | 11 lines
  
  Merged revisions 174218 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r174218 | file | 2009-02-09 10:48:21 -0400 (Mon, 09 Feb 2009) | 4 lines
    
    Don't overwrite our pointer to the music class when music on hold stops. We will use this if it starts again to see if we can resume the music where it left off.
    (closes issue #14407)
    Reported by: mostyn
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@174221 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-09 14:50:50 +00:00
Russell Bryant
1b0db3b12d Merged revisions 174149 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r174149 | russell | 2009-02-07 10:16:50 -0600 (Sat, 07 Feb 2009) | 10 lines

Merged revisions 174148 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r174148 | russell | 2009-02-07 10:15:07 -0600 (Sat, 07 Feb 2009) | 2 lines

Fix a race condition that could cause a crash.

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@174154 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-07 16:18:02 +00:00
Tilghman Lesher
a3fb73e5aa Oops, merge from trunk broke 1.6.1
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@173778 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 23:51:18 +00:00
Tilghman Lesher
a41fb27c15 Merged revisions 173657 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r173657 | tilghman | 2009-02-05 13:36:29 -0600 (Thu, 05 Feb 2009) | 2 lines
  
  Change the first field, or we don't get the necessary field separation.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@173658 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-02-05 19:37:55 +00:00
Tilghman Lesher
41b24943e8 Merged revisions 172131 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r172131 | tilghman | 2009-01-28 16:48:01 -0600 (Wed, 28 Jan 2009) | 7 lines
  
  Fix how we skip fields (to avoid fields which don't exist) when doing an UPDATE.
  (closes issue #14205)
   Reported by: maxgo
   Patches: 
         20090128__bug14205__5.diff.txt uploaded by Corydon76 (license 14)
   Tested by: blitzrage
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@172133 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-28 22:52:49 +00:00
Steve Murphy
f58d418b12 Merged revisions 168746 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
  r168746 | murf | 2009-01-15 17:34:31 -0700 (Thu, 15 Jan 2009) | 20 lines
  
  Merged revisions 168745 via svnmerge from 
  https://origsvn.digium.com/svn/asterisk/branches/1.4
  
  ........
    r168745 | murf | 2009-01-15 17:19:12 -0700 (Thu, 15 Jan 2009) | 14 lines
    
    This patch fixes a problem where a goto (or jump, in this case)
    fails a consistency check because it can't find a matching 
    extension. The problem was a missing instruction to end
    the range notation in the code where it converts the pattern
    into a regex and uses the regex code to determine the match.
    
    I tested using the AEL code the user supplied, and now,
    the consistency check passes.
    
    
    (closes issue #14141)
    Reported by: dimas
  ........
................


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@168748 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-16 00:47:29 +00:00
Terry Wilson
baf53d8d6b Merged revisions 168588 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
  r168588 | twilson | 2009-01-13 17:05:43 -0600 (Tue, 13 Jan 2009) | 5 lines
  
  Fully overwrite a same-named file when uploading
  
  (closes issue #14190)
  Reported by: timking
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@168590 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 23:14:29 +00:00
Russell Bryant
a29672060a Merged revisions 168562 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

................
r168562 | russell | 2009-01-13 13:22:13 -0600 (Tue, 13 Jan 2009) | 10 lines

Merged revisions 168561 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r168561 | russell | 2009-01-13 13:13:05 -0600 (Tue, 13 Jan 2009) | 2 lines

Revert unnecessary indications API change from rev 122314

........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.1@168565 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2009-01-13 19:35:59 +00:00