Skip to content
Snippets Groups Projects
  1. Dec 02, 2021
  2. Nov 15, 2021
    • Josh Soref's avatar
      utils: Spelling fixes · 15c4814f
      Josh Soref authored
      Correct typos of the following word families:
      
      command-line
      immediately
      extensions
      momentarily
      mustn't
      numbered
      bytes
      caching
      
      ASTERISK-29714
      
      Change-Id: I8b2b125c5d4d2f9e87a58515c97468ad47ca44f8
      15c4814f
  3. Oct 29, 2021
    • Sean Bright's avatar
      various: Fix GCC 11.2 compilation issues. · ce2d743d
      Sean Bright authored
      * Initialize some variables that are never used anyway.
      
      * Use valid pointers instead of integers cast to void pointers when
        calling pthread_setspecific().
      
      ASTERISK-29711 #close
      ASTERISK-29713 #close
      
      Change-Id: I8728cd6f2f4b28e0e48113c5da450b768c2a6683
      ce2d743d
  4. Aug 19, 2021
  5. Aug 17, 2021
  6. Aug 11, 2021
    • Joshua C. Colp's avatar
      policy: Deprecate modules and add versions to others. · 93870e7b
      Joshua C. Colp authored
      app_meetme is deprecated in 19, to be removed in 21.
      app_osplookup is deprecated in 19, to be removed in 21.
      chan_alsa is deprecated in 19, to be removed in 21.
      chan_mgcp is deprecated in 19, to be removed in 21.
      chan_skinny is deprecated in 19, to be removed in 21.
      res_pktccops is deprecated in 19, to be removed in 21.
      app_macro was deprecated in 16, to be removed in 21.
      chan_sip was deprecated in 17, to be removed in 21.
      res_monitor was deprecated in 16, to be removed in 21.
      
      ASTERISK-29548
      ASTERISK-29549
      ASTERISK-29550
      ASTERISK-29551
      ASTERISK-29552
      ASTERISK-29553
      ASTERISK-29558
      ASTERISK-29567
      ASTERISK-29572
      
      Change-Id: Ic3bee31a10d42c4b3bbc913d893f7b2a28a27131
      93870e7b
  7. Aug 06, 2021
    • Alexander Traud's avatar
      aelparse: Accept an included context with timings. · 8a6c9c3a
      Alexander Traud authored
      With Asterisk 1.6.0, in the main parser for the configuration file
      extensions.conf, the separator was changed from vertical bar to comma.
      However, the first separator was not changed in aelparse; it still had
      to be a vertical bar, and no comma was allowed.
      
      Additionally, this change allows the vertical bar for the first and
      last parameter again, even in the main parser, because the vertical bar
      was still accepted for the other parameters.
      
      ASTERISK-29540
      
      Change-Id: I882e17c73adf4bf2f20f9046390860d04a9f8d81
      8a6c9c3a
  8. Nov 03, 2020
  9. Jun 10, 2020
    • Kevin Harwell's avatar
      Compiler fixes for gcc 10 · 3d1bf3c5
      Kevin Harwell authored
      This patch fixes a few compile warnings/errors that now occur when using gcc
      10+.
      
      Also, the Makefile.rules check to turn off partial inlining in gcc versions
      greater or equal to 8.2.1 had a bug where it only it only checked against
      versions with at least 3 numbers (ex: 8.2.1 vs 10). This patch now ensures
      any version above the specified version is correctly compared.
      
      Change-Id: I54718496eb0c3ce5bd6d427cd279a29e8d2825f9
      3d1bf3c5
  10. May 05, 2020
  11. Feb 26, 2020
    • Sebastian Kemper's avatar
      check_expr2: fix cross-compile/hardening issues · b7fbb9c4
      Sebastian Kemper authored
      
      When building check_expr2 with ASLR PIE hardening enabled the linker
      fails. This is resolved by adding the regular compiler flags when
      building the object files from ast_expr2f.c and ast_expr2.c.
      
      Note: The STANDALONE define is removed because it is already defined in
      _ASTCFLAGS. YY_NO_INPUT is defined so that the compile survives
      '--enable-dev-mode'.
      
      Also, a Makefile variable "CROSS_COMPILING" is added so that the
      build system doesn't try to run check_expr2 when cross-compiling,
      because that will fail the build as will.
      
      ASTERISK-28685 #close
      
      Signed-off-by: default avatarSebastian Kemper <sebastian_ml@gmx.net>
      Change-Id: If435b7db9f9ad8266245bda51c81c220f9658915
      b7fbb9c4
  12. May 10, 2019
    • George Joseph's avatar
      Fixes for GCC 9 · c5c953c1
      George Joseph authored
      Various fixes for issues caught by gcc 9.  Mostly snprintf
      trying to copy to a buffer potentially too small.
      
      ASTERISK-28412
      
      Change-Id: I9e85a60f3c81d46df16cfdd1c329ce63432cf32e
      c5c953c1
  13. Nov 19, 2018
    • George Joseph's avatar
      backtrace: Refactor ast_bt_get_symbols so it doesn't crash · ece5f801
      George Joseph authored
      We've been seeing crashes in libbfd when we attempt to generate
      a stack trace from multiple threads.  It turns out that libbfd
      is NOT thread-safe.  It can cache the bfd structure and give it to
      multiple threads without protecting itself.  To get around this,
      we've added a global mutex around the bfd functions and also have
      refactored the use of those functions to be more efficient and
      to provide more information about inlined functions.
      
      Also added a few more tests to test_pbx.c.  One just calls
      ast_assert() and the other calls ast_log_backtrace().  Neither are
      run by default.
      
      WARNING:  This change necessitated changing the return value of
      ast_bt_get_symbols() from an array of strings to a VECTOR of
      strings.  However, the use of this function outside Asterisk is not
      likely.
      
      ASTERISK-28140
      
      Change-Id: I79d02862ddaa2423a0809caa4b3b85c128131621
      ece5f801
  14. Oct 19, 2018
    • Corey Farrell's avatar
      lock: Replace __ast_mutex_logger with private log_mutex_error. · 4c19b949
      Corey Farrell authored
      __ast_mutex_logger used the variable `canlog` without accepting it as a
      argument.  Replace with internal macro `log_mutex_error` which takes
      canlog as the first arguement.  This will prevent confusion when working
      with lock.c code, many of the function declare the canlog variable and
      in some cases it previously appeared to be unused.
      
      Change-Id: I83b372cb0654c5c18eadc512f65a57fa6c2e9853
      4c19b949
  15. Oct 18, 2018
    • Richard Mudgett's avatar
      Fix 'statement' typo throughout code. · 467f7c67
      Richard Mudgett authored
      Most were in comments.  A couple were in warning messages.
      
      Pointed out by Jonathan H on the Asterisk users mailing list.
      
      Change-Id: I6286939dff5d0a27a2758140570106f1cb351855
      467f7c67
  16. Sep 27, 2018
    • Sean Bright's avatar
      config.c: Cleanup AST_INCLUDE_GLOB · ac23e5ad
      Sean Bright authored
      * In main/config.c, AST_INCLUDE_GLOB is fixed to '1' making the #ifdefs
        pointless.
      
      * In utils/extconf.c, AST_INCLUDE_GLOB is never defined so there is a
        lot of dead code.
      
      Change-Id: I1bad1a46d7466ddf90d52cc724e997195495226c
      ac23e5ad
  17. Aug 08, 2018
    • Corey Farrell's avatar
      CI: Add support for coverage processing. · addfc938
      Corey Farrell authored
      Enable coverage with `./tests/CI/buildAsterisk.sh --coverage`.  This
      will cause Asterisk to be compiled with coverage support.  It also
      initializes 'before' coverage data for all sources.  Accept
      --tested-only to disable modules which are not run by any test.
      Enabling coverage also sets tested-only true by default.  To build
      everything with coverage enabled use `--coverage --tested-only=0`.
      
      ./tests/CI/processCoverage.sh is used to process the coverage and
      generate HTML reports.
      
      Fix utils/check_expr2 which failed to compiled with coverage enabled.
      
      Add status output 5 times per stage of astobj2_test_perf to ensure
      remote CLI does not timeout when compiled with coverage.  Remote CLI
      disconnects if no output is received for 60 seconds.  When coverage is
      enabled it takes about 70 seconds for my laptop to run the stages of
      this test, so with the change a message is printed every 14 seconds.
      
      Change-Id: I890f7d5665087426ad7d3e363187691b9afc2222
      addfc938
  18. Aug 01, 2018
    • Corey Farrell's avatar
      Build System: Improve ccache matching for different menuselect options. · a10a3aff
      Corey Farrell authored
      Changing any Menuselect option in the `Compiler Flags` section causes a
      full rebuild of the Asterisk source tree.  Every enabled option causes
      a #define to be added to buildopts.h, thus breaking ccache caching for
      every source file that includes "asterisk.h".  In most cases each option
      only applies to one or two files.  Now we only define those options for
      the specific sources which use them, this causes much better cache
      matching when working with multiple builds.  For example testing code
      with an without MALLOC_DEBUG will now use just over half the ccache
      size, only main/astmm.o will have two builds cached instead of every
      file.
      
      Reorder main/Makefile so _ASTCFLAGS set on specific object files are all
      together, sorted by filename.  Stop adding -DMALLOC_DEBUG to CFLAGS of
      bundled pjproject, this define is no longer used by any header so only
      serves to break cache.
      
      The only code change is a slight adjustment to how main/astmm.c is
      initialized.  Initialization functions always exist so main/asterisk.c
      can call them unconditionally.  Additionally rename the astmm
      initialization functions so they are not exported.
      
      Change-Id: Ie2085237a964f6e1e6fff55ed046e2afff83c027
      a10a3aff
  19. Jul 18, 2018
  20. Jun 21, 2018
  21. May 11, 2018
    • Corey Farrell's avatar
      Fix GCC 8 build issues. · b5914d90
      Corey Farrell authored
      This fixes build warnings found by GCC 8.  In some cases format
      truncation is intentional so the warning is just suppressed.
      
      ASTERISK-27824 #close
      
      Change-Id: I724f146cbddba8b86619d4c4a9931ee877995c84
      b5914d90
  22. Apr 20, 2018
  23. Apr 17, 2018
  24. Mar 19, 2018
    • Corey Farrell's avatar
      core: Remove additional symbols. · 040bb217
      Corey Farrell authored
      Remove symbols that are depreacated and replaced:
      * ast_channel_datastore_alloc
      * ast_channel_datastore_free
      * ast_channel_cmpwhentohangup
      * ast_channel_setwhentohangup
      * config_text_file_save
      * devstate2str
      * ast_device_state_changed
      * ast_device_state_changed_literal
      * ast_verbose_get_by_module
      
      Remove unused symbols:
      * channelreloadreason2txt (last used in Asterisk 12).
      
      Remove unused ast_options flags:
      * AST_OPT_FLAG_END_CDR_BEFORE_H_EXTEN / ast_opt_end_cdr_before_h_exten
      * AST_OPT_FLAG_VERBOSE_MODULE / ast_opt_verb_module
      * AST_OPT_FLAG_INITIATED_SECONDS
      
      Change-Id: I841255995d195f8efc1ed47af9c7a2f131c08645
      040bb217
  25. Mar 17, 2018
    • Corey Farrell's avatar
      core: Stop using AST_INLINE_API for allocator functions. · 4d1c9d87
      Corey Farrell authored
      This replaces AST_INLINE_API allocators in utils.h with real functions
      implemented in astmm.c.  Associated macro's are also moved from utils.h
      to astmm.h.
      
      Remove menuselect conflicts between MALLOC_DEBUG and DEBUG_CHAOS as they
      can now be combined.
      
      This has multiple benefits:
      * Simplifies asterisk/utils.h by removing inline functions and use of
        the logger.
      * Removal of these inline functions decreases size of Asterisk and
        module binaries by 1% or more.
      * Puts memory management functions together with and without
        MALLOC_DEBUG enabled, simplifying management of the code.
      * Enables DEBUG_CHAOS for ASTMM_REDIRECT and bundled pjproject.
      
      Change-Id: If9df4377f74bdbb627461b27a473123e05525887
      4d1c9d87
  26. Mar 13, 2018
    • Corey Farrell's avatar
      core: Remove incorrect usage of attribute_malloc. · 9e488dd4
      Corey Farrell authored
      GCC documentation states that when __attribute__((malloc)) is used it
      should not return storage which contains any valid pointers.  It
      specifically mentions that realloc functions should not have the malloc
      attribute, but this also means that complex initializers which could
      contain initialized pointers should not use this attribute.
      
      Change-Id: If507f33ffb3ca3b83b702196eb0e8215d27fc7d2
      9e488dd4
  27. Jan 25, 2018
  28. Dec 22, 2017
  29. Oct 24, 2017
  30. Aug 01, 2017
    • Corey Farrell's avatar
      Fix compiler warnings on Fedora 26 / GCC 7. · 58d03211
      Corey Farrell authored
      GCC 7 has added capability to produce warnings, this fixes most of those
      warnings.  The specific warnings are disabled in a few places:
      
      * app_voicemail.c: truncation of paths more than 4096 chars in many places.
      * chan_mgcp.c: callid truncated to 80 chars.
      * cdr.c: two userfields are combined to cdr copy, fix would break ABI.
      * tcptls.c: ignore use of deprecated method SSLv3_client_method().
      
      ASTERISK-27156 #close
      
      Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
      58d03211
  31. Feb 23, 2017
    • frahaase's avatar
      Binaural synthesis (confbridge): Adds binaural synthesis to bridge_softmix. · 094c26aa
      frahaase authored
      Adds binaural synthesis to bridge_softmix (via convolution using libfftw3).
      Binaural synthesis is conducted at 48kHz.
      For a conference, only one spatial representation is rendered.
      The default rendering is applied for mono-capable channels.
      
      ASTERISK-26292
      
      Change-Id: Iecdb381b6adc17c961049658678f6219adae1ddf
      094c26aa
  32. Feb 15, 2017
  33. Jan 04, 2017
    • Jonathan R. Rose's avatar
      core/pbx: dialplan show - display filename/line# · d96e3502
      Jonathan R. Rose authored
      Adds the ability for extensions to be registered to include filename and
      line number so that dialplan show output can show the filename and line
      number of a config file responsible for generating a given extension.
      
      This only affects config modules that are written to use the new extension
      registering functions. In this patch, that only includes pbx_config, so
      extensions registered in extensions.conf and any included extension will
      be shown in this manner. Extensions registered in this manner will show
      the filename and line number *instead* of the registrar.
      
      ASTERISK-26658 #close
      Reported by: Jonathan R. Rose
      
      Change-Id: Ieccc6abccdff34ed5c7da3511fd24972b8f2dd30
      d96e3502
  34. Oct 27, 2016
    • Corey Farrell's avatar
      Remove ASTERISK_REGISTER_FILE. · a6e5bae3
      Corey Farrell authored
      ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
      all traces of it.
      
      Previously exported symbols removed:
      * __ast_register_file
      * __ast_unregister_file
      * ast_complete_source_filename
      
      This also removes the mtx_prof static variable that was declared when
      MTX_PROFILE was enabled.  This variable was only used in lock.c so it
      is now initialized in that file only.
      
      ASTERISK-26480 #close
      
      Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
      a6e5bae3
  35. Sep 29, 2016
  36. Aug 20, 2016
    • Corey Farrell's avatar
      Fix naming mismatch of allocator functions. · 8061d9f6
      Corey Farrell authored
      Allocator functions that take file/line/func parameters are prefixed
      with single-underscore when MALLOC_DEBUG is not defined,
      double-underscore when it is defined.  This change updates all
      allocators that accept file/line/func to have the same prototype in
      either ABI mode.  The parameter order of __ast_vasprintf and
      __ast_asprintf in utils.h have been changed to match that of astmm.h.
      
      End-use allocator macro's have been removed from astmm.h and moved to an
      unconditional part of utils.h.
      
      Change-Id: I823bb6ce2b5675b3a4735948f10a3b420e9a023a
      8061d9f6
  37. Jul 21, 2016
    • Corey Farrell's avatar
      pbx: Create pbx_sw.c for management of 'struct ast_sw'. · a36a174c
      Corey Farrell authored
      This changes context switches from a linked list to a vector, makes
      'struct ast_sw' opaque to pbx.c.
      
      Although ast_walk_context_switches is maintained the procedure is no
      longer efficient except for the first call (inc==NULL).  This
      functionality is replaced by two new functions implemented by vector
      macros.
      * ast_context_switches_count (AST_VECTOR_SIZE)
      * ast_context_switches_get (AST_VECTOR_GET)
      
      As with ast_walk_context_switches callers of these functions are
      expected to have locked contexts.  Only a few places in Asterisk walked
      the switches, they have been converted to use the new functions.
      
      Change-Id: I08deb016df22eee8288eb03de62593e45a1f0998
      a36a174c
  38. Jul 18, 2016
    • Corey Farrell's avatar
      pbx: Create pbx_ignorepat.c for management of 'struct ast_ignorepat'. · e2e8713b
      Corey Farrell authored
      This changes context ignore patterns from a linked list to a vector,
      makes 'struct ast_ignorepat' opaque to pbx.c.
      
      Although ast_walk_context_ignorepats is maintained the procedure is no
      longer efficient except for the first call (inc==NULL).  This
      functionality is replaced by two new functions implemented by vector
      macros.
      * ast_context_ignorepats_count (AST_VECTOR_SIZE)
      * ast_context_ignorepats_get (AST_VECTOR_GET)
      
      As with ast_walk_context_ignorepats callers of these functions are
      expected to have locked contexts.  Only a few places in Asterisk walked
      the ignorepats, they have been converted to use the new functions.
      
      Change-Id: I78f2157d275ef1b7d624b4ff7d770d38e5d7f20a
      e2e8713b
  39. Jul 15, 2016
    • Corey Farrell's avatar
      pbx: Create pbx_include.c for management of 'struct ast_include'. · be36bd7c
      Corey Farrell authored
      This changes context includes from a linked list to a vector, makes
      'struct ast_include' opaque to pbx.c.
      
      Although ast_walk_context_includes is maintained the procedure is no
      longer efficient except for the first call (inc==NULL).  This
      functionality is replaced by two new functions implemented by vector
      macros.
      * ast_context_includes_count (AST_VECTOR_SIZE)
      * ast_context_includes_get (AST_VECTOR_GET)
      
      As with ast_walk_context_includes callers of these functions are
      expected to have locked contexts.  Only a few places in Asterisk walked
      the includes, they have been converted to use the new functions.
      
      const have been applied where possible to parameters for ast_include
      functions.
      
      Change-Id: Ib5c882e27cf96fb2aec67a39c18b4c71c9c83b60
      be36bd7c
Loading