Skip to content
Snippets Groups Projects
  1. May 08, 2015
    • Alexander Traud's avatar
      tcptls: Avoiding ERR_remove_state in OpenSSL. · 5cca9a66
      Alexander Traud authored
      ERR_remove_state was deprecated with OpenSSL 1.0.0 and was replaced by 
      ERR_remove_thread_state. ERR_load_SSL_strings and ERR_load_BIO_strings were 
      called by SSL_load_error_strings already and got removed. These changes allow 
      OpenSSL forks like BoringSSL to be used with Asterisk.
      
      ASTERISK-25043 #close
      Reported by: Alexander Traud
      patches:
        asterisk_with_BoringSSL.patch uploaded by Alexander Traud (License 6520)
      
      Change-Id: If1c0871ece21a7e0763fafbd2fa023ae49d4d629
      (cherry picked from commit 247fef66)
      5cca9a66
  2. May 07, 2015
  3. May 06, 2015
  4. May 05, 2015
  5. May 04, 2015
  6. May 03, 2015
    • Diederik de Groot's avatar
      Update configure.ac/Makefile for clang · f70f2c62
      Diederik de Groot authored
      Created autoconf/ast_check_raii.m4: contains AST_CHECK_RAII which
      checks compiler requirements for RAII:
      gcc: -fnested-functions support
      clang: -fblocks (and if required -lBlocksRuntime)
      The original check was implemented in configure.ac and now has it's
      own file. This function also sets C_COMPILER_FAMILY to either gcc or
      clang for use by makefile
      
      Created autoconf/ast_check_strsep_array_bounds.m4 (contains
      AST_CHECK_STRSEP_ARRAY_BOUNDS):
      which checks if clang is able to handle the optimized strsep & strcmp
      functions (linux). If not, the standard libc implementation should be
      used instead. Clang + the optimized macro's work with:
      strsep(char *, char []), but not with strsepo(char *, char *).
      Instead of replacing all the occurences throughout the source code,
      not using the optimized macro version seemed easier
      
      See 'define __strcmp_gc(s1, s2, l2) in bits/string2.h':
      llvm-comment: Normally, this array-bounds warning are suppressed for
      macros, so that unused paths like the one that accesses __s1[3] are
      not warned about.  But if you preprocess manually, and feed the
      result to another instance of clang, it will warn about all the
      possible forks of this particular if statement. Instead of switching
      of this optimization, another solution would be to run the preproces-
      sing step with -frewrite-includes, which should preserve enough
      information so that clang should still be able to suppress the diag-
      nostic at the compile step later on.
      
      See also "https://llvm.org/bugs/show_bug.cgi?id=20144"
      See also "https://llvm.org/bugs/show_bug.cgi?id=11536"
      
      Makefile.rules: If C_COMPILER_FAMILY=clang then add two warning
      suppressions:
      -Wno-unused-value
      -Wno-parentheses-equality
      In an earlier review (reviewboard: 4550 and 4554), they were deemed a
      nuisace and less than benefitial.
      
      configure.ac:
      Added AST_CHECK_RAII() see earlier
      Added AST_CHECK_STRSEP_ARRAY_BOUNDS() see earlier
      Removed moved content
      
      ASTERISK-24917
      Change-Id: I12ea29d3bda2254ad3908e279b7effbbac6a97cb
      (cherry picked from commit 9c3ed428)
      f70f2c62
    • Matt Jordan's avatar
  7. May 02, 2015
  8. May 01, 2015
    • Corey Farrell's avatar
      Build System: Prevent unneeded changes to asterisk/buildopts.h. · ce863404
      Corey Farrell authored
      * Add AST_DEVMODE to BUILDOPTS
      * Remove CFLAGS that do not effect ABI from BUILDOPTS.
      * Use BUILDOPTS to generate AST_BUILDOPT_SUM.
      * Remove loop that defined AST_MODULE_*
      
      These changes ensure that only ABI effecting options are considered for
      AST_BUILDOPT_SUM.  This also reduces unneeded full system rebuilds caused
      by enabling or disabling one module that another is dependent on.
      
      ASTERISK-25028 #close
      Reported by: Corey Farrell
      
      Change-Id: I2c516d93df9f6aaa09ae079a8168c887a6ff93a2
      ce863404
    • Richard Mudgett's avatar
      v11: More files to ignore. · f3bc0cc7
      Richard Mudgett authored
      Change-Id: If5eef47d03399ff93e3f2f490780144971f6b64a
      f3bc0cc7
    • Matt Jordan's avatar
      main/pbx: Improve performance of dialplan reloads with a large number of hints · 8297136f
      Matt Jordan authored
      The PBX core maintains two hash tables for hints: a container of the
      actual hints (hints), along with a container of devices that are watching that
      hint (hintdevices). When a dialplan reload occurs, each hint in the hints
      container is destroyed; this requires a lookup in the container of devices to
      find the device => hint mapping object. In the current code, this performs an
      ao2_callback, iterating over each of the device to hint objects in the
      hintdevices container. For a large number of hints, this is extremely
      expensive: dialplan reloads with 20000 hints could take several minutes
      in just this phase.
      
      This patch improves the performance of this step in the dialplan reloads
      by caching which devices are watching a hint on the hint object itself.
      Since we don't want to create a circular reference, we just cache the
      name of the device. This allows us to perform a smarter ao2_callback on
      the hintdevices container during hint removal, hashing on the name of the
      device and returning an iterator to the matching names. The overall
      performance improvement is rather large, taking this step down to a number of
      seconds as opposed to minutes.
      
      In addition, this patch also registers the hint containers in the PBX
      core with the astobj2 library. This allows for reasonable debugging to
      hash collisions in those containers.
      
      ASTERISK-25040 #close
      Reported by: Matt Jordan
      
      Change-Id: Iedfc97a69d21070c50fca42275d7b3e714e59360
      (cherry picked from commit 80c0756f7386452fddab3324fa6a71933cde006e)
      8297136f
  9. 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
    • Rodrigo Ramírez Norambuena's avatar
      cdr/cdr_csv.c: Add a new option to enable columns added in Asterisk 1.8 · a7877432
      Rodrigo Ramírez Norambuena authored
      This patch adds a new option to cdr.conf, 'newcdrcolumns', that will handle CDR
      columns added in Asterisk 1.8. The columns are:
       * peeraccount
       * linkedid
       * sequence
      When enabled, the columns in the database entry will be populated with the data
      from the CDR.
      
      ASTERISK-24976 #close
      
      Change-Id: I51a57063f4ae5e194a9d933a8df45dc8a4534f0b
      a7877432
  10. 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
  11. Apr 28, 2015
  12. Apr 27, 2015
  13. Apr 26, 2015
  14. 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
  15. 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
  16. 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
  17. Apr 21, 2015
Loading