Skip to content
Snippets Groups Projects
  1. May 04, 2015
    • Martin Tomec's avatar
      res_odbc: Use negative connection cache for all connections · 7c32cb27
      Martin Tomec authored
      Apply the negative connection cache setting to all connections,
      even those that are not pooled. This ensures that the connection
      will not be re-established before the negative connection cache
      time is met.
      
      ASTERISK-22708 #close
      
      Change-Id: I431cc2e8584ab0b6908b3523d0a0e18c9a527271
      7c32cb27
  2. Apr 30, 2015
    • Mark Michelson's avatar
    • Matt Jordan's avatar
      include/asterisk/vector.h: Backport vector.h to Asterisk 11 · 176cb0d4
      Matt Jordan authored
      Vectors are very useful constructs. As a container, they prevent having
      to calloc/realloc arrays manually. They also have advantages over linked
      lists, which require elements in the list to be a struct. This patch
      backports vectors to Asterisk 11 for use in future patches.
      
      Change-Id: Idc9d74d246a0158b0b36ccb250e7acc71bab078d
      176cb0d4
    • Richard Mudgett's avatar
      chan_dahdi: Add the chan_dahdi.conf force_restart_unavailable_chans option. · b54f5fda
      Richard Mudgett authored
      Some telco switches occasionally ignore ISDN RESTART requests.  The fix
      for ASTERISK-19608 added an escape clause for B channels in the restarting
      state if the telco ignores a RESTART request.  If the telco fails to
      acknowledge the RESTART then Asterisk will assume the telco acknowledged
      the RESTART on the second call attempt requesting the B channel by the
      telco.  The escape clause is good for dealing with RESTART requests in
      general but it does cause the next call for the restarting B channel to be
      rejected if the telco insists the call must go on that B channel.
      
      chan_dahdi doesn't really need to issue a RESTART request in response to
      receiving a cause 44 (Requested channel not available) code.  Sending the
      RESTART in such a situation is not required (nor prohibited) by the
      standards.  I think chan_dahdi does this for historical reasons to deal
      with buggy peers to get channels unstuck in a similar fashion as the
      chan_dahdi.conf resetinterval option.
      
      * Add the chan_dahdi.conf force_restart_unavailable_chans compatability
      option that when disabled will prevent chan_dahdi from trying to RESTART
      the channel in response to a cause 44 code.
      
      ASTERISK-25034 #close
      Reported by: Richard Mudgett
      
      Change-Id: Ib8b17a438799920f4a2038826ff99a1884042f65
      b54f5fda
  3. Apr 29, 2015
    • Matt Jordan's avatar
    • Matt Jordan's avatar
      main/rtp_engine: Fix DTLS double-free introduced by 0b6410c4 · 28fd06bd
      Matt Jordan authored
      The patch in 0b6410c4 did correctly fix a memory leak of the DTLS
      structures in the RTP engine. However, when a 'core reload' is issued, a
      double free of the memory pointed to by the char *'s in the DTLS
      configuration struct can occur, as ast_rtp_dtls_cfg_free does not set
      the pointers to NULL when they are freed.
      
      This patch sets those pointers to NULL, preventing a second call to
      ast_rtp_dtls_cfg_free from corrupting memory.
      
      ASTERISK-25022
      
      Change-Id: I820471e6070a37e3c26f760118c86770e12f6115
      28fd06bd
    • Kevin Harwell's avatar
      res_fax: allow 2400 transmission rate according to v.27ter standard · f6091525
      Kevin Harwell authored
      A previous set of patches (see: ASTERISK-22790 & ASTERISK-23231) made it so
      a v.27 modem was not allowed to have a minimum transmission rate of 2400 bits
      per second. This reverts all or some of those patches since according to the
      v.27ter standard a rate of 2400 bits per second is also supported.
      
      One of the original patches also added 9600 bits per second support for v.27.
      This patch also removes that since v.27ter only supports 2400/4800 bits per
      second.
      
      Also, since Asterisk specifically supports v.27ter the enum was renamed to
      better reflect this.
      
      ASTERISK-24955 #close
      Reported by: Matt Jordan
      
      Change-Id: I4b9dfb6bf7eff08463ab47ee1a74224f27cae733
      f6091525
    • Richard Mudgett's avatar
      Fixup UPGRADE.txt so new notes go in correct section for next release. · 32cab650
      Richard Mudgett authored
      Change-Id: I7080d32b559f8c5d06ddd3198e0cd6e342bac841
      32cab650
    • Joshua Colp's avatar
    • Mark Michelson's avatar
      rtp_engine: Prevent unnecessary memory increases during calls. · c87b0d73
      Mark Michelson authored
      The doxygen for ast_rtp_codecs_payloads_copy() states:
      
      "This copies the payloads from the codecs0 structure to the codecs1
      structure, overwriting any current values."
      
      However, in practice, the overwriting of current values was not
      happening. Instead, a new RTP codec payload object would be appended to
      the codecs1 structure instead of replacing the corresponding object.
      
      This patch corrects this behavior by overwriting the object in the
      codecs1 structure if it exists already. If it does not already exist,
      then create a new copy and link it in.
      
      Tests of "memory show summary rtp_engine.c" had previously shown
      additional allocations being performed any time that Asterisk processed
      an incoming SDP. Scenarios involving lots of reinvites resulted in lots
      of allocations. With this patch, I can perform as many reinvites as
      I want and see no memory increases from the RTP engine.
      
      ASTERISK-24916 #close
      Reported by Christophe Osuna
      
      Change-Id: I9a90bc3f564535bc767bf2fc0c455d5f065cea75
      c87b0d73
    • Ivan Poddubny's avatar
      addons/res_config_mysql: Don't mutate va_list parameters · 41bf5231
      Ivan Poddubny authored
      The realtime API passes down the va_list argument to each RT engine in
      failover chain until one succeeds. MySQL engine used to access the
      variable argument list with va_arg, which mutates the va_list, so the
      next engine in failover chain gets invalid agrument list.
      This patch uses va_copy to preserve the original va_list argument intact.
      
      ASTERISK-19538 #close
      Reported by: alexat
      Tested by: Ivan Poddubny
      
      Change-Id: I7738b9f98bde81ddfbc2c0fa579d85a0c3e580ae
      41bf5231
  4. Apr 28, 2015
  5. Apr 27, 2015
  6. Apr 26, 2015
  7. Apr 24, 2015
    • Matt Jordan's avatar
    • Kevin Harwell's avatar
      app_confbridge: Default the template option to a compatible default profile. · 019695b4
      Kevin Harwell authored
      Confbridge dynamic profiles did not have a default profile unless you
      explicitly used Set(CONFBRIDGE(bridge,template)=default_bridge). If a
      template was not set prior to the bridge being created then some
      options were left with no default values set. This patch makes it so
      the default templates are set to the default bridge and user profiles.
      
      ASTERISK-24749 #close
      Reported by: philippebolduc
      
      Change-Id: I1bd6e94b38701ac2112d842db68de63d46f60e0a
      019695b4
    • Matt Jordan's avatar
      Clang: Fix some more tautological-compare warnings. · 3bb1e967
      Matt Jordan authored
      clang can warn about a so called tautological-compare, when it finds
      comparisons which are logically always true, and are therefore deemed
      unnecessary.
      
      Example:
      unsigned int x = 4;
      if (x > 0) // x is always going to be bigger than 0
      
      Enum Case:
      Each enumeration is its own type. Enums are an integer type but they do not
      have to be *signed*. C leaves it up to the compiler as an implementation
      option what to consider the integer type of a particular enumeration is.
      Gcc treats an enum without negative values as an int while clang treats this
      enum as an unsigned int.
      
      rmudgett & mmichelson:
      cast the enum to (unsigned int) in assert. The cast does have an effect.
      For gcc, which seems to treat all enums as int, the cast to unsigned int
      will eliminate the possibility of negative values being allowed. For
      clang, which seems to treat enums without any negative members as
      unsigned int, the cast will have no effect. If for some reason in the
      future a negative value is ever added to the enum the assert will still
      catch the negative value.
      
      ASTERISK-24917
      
      Change-Id: Ief23ef68916192b9b72dabe702b543ecfeca0b62
      3bb1e967
    • Diederik de Groot's avatar
      Example script for scan-build (the llvm static analyzer) · 82387f7d
      Diederik de Groot authored
       - Added Pre-amble (Options / Flags / Usage Example / GNU License)
       - Extended Configurability
       - Made Executable
      
      ASTERISK-24917
      Change-Id: I70405fe54e4be7dbfbcb62e291690069b88617a8
      82387f7d
  8. Apr 23, 2015
    • Diederik de Groot's avatar
      Clang: change previous tautological-compare fixes. · 9c612450
      Diederik de Groot authored
      clang can warn about a so called tautological-compare, when it finds
      comparisons which are logically always true, and are therefor deemed
      unnecessary.
      
      Exanple:
      unsigned int x = 4;
      if (x > 0)    // x is always going to be bigger than 0
      
      Enum Case:
      Each enumeration is its own type. Enums are an integer type but they
      do not have to be *signed*. C leaves it up to the compiler as an
      implementation option what to consider the integer type of a particu-
      lar enumeration is. Gcc treats an enum without negative values as
      an int while clang treats this enum as an unsigned int.
      
      rmudgett & mmichelson: cast the enum to (unsigned int) in assert.
      The cast does have an effect. For gcc, which seems to treat all enums
      as int, the cast to unsigned int will eliminate the possibility of
      negative values being allowed. For clang, which seems to treat enums
      without any negative members as unsigned int, the cast will have no
      effect. If for some reason in the future a negative value is ever
      added to the enum the assert will still catch the negative value.
      
      ASTERISK-24917
      
      Change-Id: I0557ae0154a0b7de68883848a609309cdf0aee6a
      9c612450
  9. Apr 22, 2015
    • George Joseph's avatar
      .gitignore: Add .gcno and .gcda · f56c5f1a
      George Joseph authored
      Products of --enable-coverage
      
      Change-Id: Ie20882d64b60692e2c941ea8872ab82a86ce77a3
      f56c5f1a
    • Diederik de Groot's avatar
      Fix/Update clang-RAII macro implementation · 42955825
      Diederik de Groot authored
      - When you need to refer to 'variable XXX' outside a block, it needs
      to be declared as '__block XXX', otherwise it will not be available with-
      in the block, making updating that variable hard to do, and ast_free
      lead to issues.
      
      - Removed the #error message
      because it creates complications when compiling external projects
      against asterisk For example when using a different compiler than the
      one used to compile asterisk. The warning/error should be generated
      during the configure process not the compilation process
      
      ASTERISK-24917
      Change-Id: I12091228090e90831bf2b498293858f46ea7a8c2
      42955825
  10. Apr 21, 2015
    • Corey Farrell's avatar
      Check for ao2_alloc failure in __ast_channel_internal_alloc. · fc79cae5
      Corey Farrell authored
      Fix a crash that could occur in __ast_channel_internal_alloc if
      ao2_alloc fails.
      
      ASTERISK-24991 #close
      
      Change-Id: I4ca89189eb22f907408cb87d0a1645cfe1314a90
      fc79cae5
    • Richard Mudgett's avatar
      chan_dahdi/sig_pri: Make post AMI HangupRequest events on PRI channels. · e4b956b1
      Richard Mudgett authored
      The chan_dahdi channel driver is a very old driver.  The ability for it to
      support ISDN was added well after the initial analog support.  Setting the
      softhangup flags is a carry over from the original analog code.  The
      driver was not updated to call ast_queue_hangup() which will post the AMI
      HangupRequest event.
      
      * Changed sig_pri.c to call ast_queue_hangup() instead of setting the
      softhangup flag when the remote party initiates a hangup.
      
      ASTERISK-24895 #close
      Reported by: Andrew Zherdin
      
      Change-Id: I5fe2e48556507785fd8ab8e1c960683fd5d20325
      e4b956b1
  11. Apr 20, 2015
  12. Apr 19, 2015
    • Matt Jordan's avatar
      main/pbx: Don't attempt to destroy a previously destroyed exten/priority tuple · 6ed37a7f
      Matt Jordan authored
      When a PBX registrar is unloaded, it will fail to remove its extension from
      the context root_table if a dialplan application used by that extension is
      still loaded. This can be the case for AGI, which can be unloaded after several
      of the standard PBX providers. Often, this is harmless; however, if the
      extension's priorities are removed during the failed unloading *and* the
      dialplan application later unregisters, it leaves a ticking timebomb for the
      next PBX provider that attempts to iterate over the extensions. When that
      occurs, the peer_table pointer on the extension will already be set to NULL.
      The current code does not check to see if the pointer is NULL before passing
      it to a hashtab function this is not NULL tolerant.
      
      Since it is possible for the peer_table to be NULL when we normally would not
      expect that to be the case, the solution in this patch is to simply skip over
      processing an extension's priorities if peer_table is NULL.
      
      Prior to this patch, the tests/pbx/callerid_match test would crash during
      module unload. With this patch, the test no longer crashes after running.
      
      ASTERISK-24774 #close
      Reported by: Corey Farrell
      
      Change-Id: I2bbeecb7e0f77bac303a1b9135e4cdb4db6d4c40
      6ed37a7f
    • Matt Jordan's avatar
      UPGRADE: Fix upgrade notes · e2520715
      Matt Jordan authored
      The next expected release from the 11 branch is 11.18.0. This patch
      updates the UPGRADE notes to reflect that.
      
      Change-Id: I8e6e9d62b3916484a68733cfc8d64b3709adb0c2
      e2520715
  13. Apr 17, 2015
    • Corey Farrell's avatar
      Fix issue with AST_THREADSTORAGE_RAW when DEBUG_THREADLOCALS is enabled. · 8fc07492
      Corey Farrell authored
      When DEBUG_THREADLOCALS is enabled it causes the threadlocal cleanup to be
      called as a function.  This causes a compile error with raw threadstorage as
      it uses NULL for cleanup.  This fix uses a macro that provides NULL when
      DEBUG_THREADLOCALS is disabled, and replaces the call to "c_cleanup(data);"
      with "{};" when DEBUG_THREADLOCALS is enabled.
      
      ASTERISK-24975 #close
      Reported by: Ashley Sanders
      
      Change-Id: I3ef7428ee402816d9fcefa1b3b95830c00d5c402
      8fc07492
  14. Apr 15, 2015
  15. Apr 14, 2015
  16. Apr 13, 2015
    • David M. Lee's avatar
      Fixing extconf compile · e540034f
      David M. Lee authored
      During the mass code deletion for clang support, a stray backslash was
      left behind that was causing utils to fail to compile.
      
      Change-Id: I60e5fa58c9a5b248bde23aaada79ff663f87a2a1
      e540034f
Loading