Skip to content
Snippets Groups Projects
  1. Mar 19, 2018
  2. Mar 17, 2018
  3. Mar 15, 2018
  4. Mar 14, 2018
    • Corey Farrell's avatar
      loader: Convert reload_classes to built-in modules. · 572a508e
      Corey Farrell authored
      * acl (named_acl.c)
      * cdr
      * cel
      * ccss
      * dnsmgr
      * dsp
      * enum
      * extconfig (config.c)
      * features
      * http
      * indications
      * logger
      * manager
      * plc
      * sounds
      * udptl
      
      These modules are now loaded at appropriate time by the module loader.
      Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so
      the module loader will abort startup on failure of these modules.
      
      Some of these modules are still initialized or shutdown from outside the
      module loader.  logger.c is initialized very early and shutdown very
      late, manager.c is initialized by the module loader but is shutdown by
      the Asterisk core (too much uses it without holding references).
      
      Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
      572a508e
  5. 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
    • Corey Farrell's avatar
      stringfields: Remove MALLOC_DEBUG fields from struct ast_string_field_mgr. · ea9768ff
      Corey Farrell authored
      This causes MALLOC_DEBUG reporting to be slightly different, calls which
      cause additional memory pools to be allocated now report the callers
      location rather than the location which originally allocated the
      string field structure.  This reduces storage needed by string fields
      and allows MALLOC_DEBUG to identify the source of additional allocations
      rather than obscuring it by reporting the original allocation caller.
      
      Change-Id: Idd18e6639a87ab862079b580c114d90361412289
      ea9768ff
    • Corey Farrell's avatar
      core: Remove non-critical cleanup from startup aborts. · fee929c8
      Corey Farrell authored
      When built-in components of Asterisk fail to start they cause the
      Asterisk startup to abort.  In these cases only the most critical
      cleanup should be performed - closing databases and terminating
      proceses.  These cleanups are registered using ast_register_atexit, all
      other cleanups should not be run during startup abort.
      
      The main reason for this change is that these cleanup procedures are
      untestable from the partially initialized states, if they fail it could
      prevent us from ever running the critical cleanup with ast_run_atexits.
      
      Create separate initialization for dns_core.c to be run unconditionally
      during startup instead of being initialized by the first dns resolver to
      be registered. This ensures that 'sched' is initialized before it can be
      potentially used.
      
      Replace ast_register_atexit with ast_register_cleanup in media_cache.c.
      There is no reason for this cleanup to happen unconditionally.
      
      Change-Id: Iecc2df98008b21509925ff16740bd5fa29527db3
      fee929c8
  6. Mar 08, 2018
    • Alexander Traud's avatar
      BuildSystem: Instead of $PJPROJECT_LIBS with s, use $PJPROJECT_LIB everywhere. · fc64a0e2
      Alexander Traud authored
      In the script ./configure,
      xyz_LIB  is set by AST_PKG_CONFIG_CHECK and
      xyz_LIBS is set by PKG_CHECK_MODULES within
      AST_PKG_CONFIG_CHECK. Both are the same. In Asterisk normally the former and
      only three times the latter was used. Let us use xyz_LIB without s, for
      consistency with AST_EXT_LIB_CHECK. That eases understanding because now readers
      do not have to know that xyz_LIB equals xyz_LIBS.
      
      Change-Id: I7359860a5d730cdc784c2c48e501a082196434d3
      fc64a0e2
  7. Mar 07, 2018
    • Corey Farrell's avatar
      Replace direct checks of option_debug with DEBUG_ATLEAST macro. · c8a521b6
      Corey Farrell authored
      Checking option_debug directly is incorrect as it ignores file/module
      specific debug settings.  This system-wide change replaces nearly all
      direct checks for option_debug with the DEBUG_ATLEAST macro.
      
      Change-Id: Ic342d4799a945dbc40ac085ac142681094a4ebf0
      c8a521b6
    • Alexander Traud's avatar
      utils: In Solaris, avoid a warning about an unused variable. · 58f44f22
      Alexander Traud authored
      When HAVE_GETHOSTBYNAME_R_5 was set by the script ./configure, GCC 7.3.0 found
      an unused variable. Actually, the variable was used (set to a dummy value) but
      the compiler optimization might have removed that. Instead, this change ensures
      that the variable 'res' is only used when it is really required.
      
      Change-Id: Ic3ea23ccf84ac4bc2d501b514985b989030abab5
      58f44f22
  8. Mar 03, 2018
  9. Mar 01, 2018
    • Richard Mudgett's avatar
      core: Remove ABI effects of MALLOC_DEBUG. · c711e407
      Richard Mudgett authored
      This allows asterisk to be compiled with MALLOC_DEBUG to load modules
      built without MALLOC_DEBUG.  Now pre-compiled third-party modules will
      still work regardless of MALLOC_DEBUG being enabled or not.
      
      Change-Id: Ic07ad80b2c2df894db984cf27b16a69383ce0e10
      c711e407
  10. Feb 28, 2018
    • Richard Mudgett's avatar
      pjproject: Add cache_pools debugging option. · 1a36a452
      Richard Mudgett authored
      The pool cache gets in the way of finding use after free errors of memory
      pool contents.  Tools like valgrind and MALLOC_DEBUG don't know when a
      pool is released because it gets put into the cache instead of being
      freed.
      
      * Added the "cache_pools" option to pjproject.conf.  Disabling the option
      helps track down pool content mismanagement when using valgrind or
      MALLOC_DEBUG.  The cache gets in the way of determining if the pool
      contents are used after free and who freed it.
      
      To disable the pool caching simply disable the cache_pools option in
      pjproject.conf and restart Asterisk.
      
      Sample pjproject.conf setting:
      [startup]
      cache_pools=no
      
      * Made current users of the caching pool factory initialization and
      destruction calls call common routines to create and destroy cached pools.
      
      ASTERISK-27704
      
      Change-Id: I64d5befbaeed2532f93aa027a51eb52347d2b828
      1a36a452
  11. Feb 23, 2018
    • Corey Farrell's avatar
      core: Fix handling of maximum length lines in config files. · a7927471
      Corey Farrell authored
      When a line is the maximum length "\n" is found at sizeof(buf) - 2 since
      the last character is actually the null terminator.  In addition if a
      line was exactly 8190 plus a multiple of 8192 characters long the config
      parser would skip the following line.
      
      Additionally fix comment in voicemail.conf sample config.  It previously
      stated that emailbody can only contain up to 512 characters which is
      always wrong.  The buffer is normally 8192 characters unless LOW_MEMORY
      is enabled then it is 512 characters.  The updated comment states that
      the line can be up to 8190 or 510 characters since the line feed and
      NULL terminator each use a character.
      
      ASTERISK-26688 #close
      
      Change-Id: I80864a0d40d2e2d8cd79d72af52a8f0a3a99c015
      a7927471
  12. Feb 21, 2018
    • Richard Mudgett's avatar
      manager.c: Fix lseek() parameter order. · f083edc4
      Richard Mudgett authored
      ASTERISK-27659
      
      Change-Id: I04a2705d2cb7df250769967bc59e2b397a49b797
      f083edc4
    • Joshua Colp's avatar
      AST-2018-001: rtp / channel: Don't allow an unnegotiated format to be passed up. · e70c4ec8
      Joshua Colp authored
      When an RTP packet is received by an RTP engine it has to map the
      payload into the Asterisk format. The code was incorrectly checking
      our own static list for ALL payloads if it couldn't find a negotiated one.
      This included dynamic payloads. If the payload mapped to a format
      of a different type (for example receiving a video packet on an audio
      RTP instance) then the core stream code could cause a crash if a legacy
      channel driver was in use as no stream would be present.
      
      To provide further protection the core stream code will no longer assume
      that a video or audio frame will always have a stream for legacy channel
      drivers. If no stream is present the frame is dropped.
      
      ASTERISK-27488
      
      Change-Id: I022556f524ad8379ee73f14037040af17ea3316a
      e70c4ec8
  13. Feb 20, 2018
  14. Feb 19, 2018
    • Corey Farrell's avatar
      core: Rename sounds_index.c to sounds.c. · 97c21e9c
      Corey Farrell authored
      This will make the source filename match the 'module reload sounds'
      command.  This will allow conversion to a built-in module in Asterisk 16
      without needing to redefine AST_MODULE.
      
      Change-Id: Ifb8e489575b27eb33d8c0b6a531f266670557f6e
      97c21e9c
    • Corey Farrell's avatar
      config: Fix locking for extconfig reload. · e03f0f95
      Corey Farrell authored
      Expand locking to include full reload process for extconfig to ensure
      nothing can read the config mappings between clearing and reloading.
      
      Change-Id: I378316bad04f1b599ea82d0fef62b8978a644b92
      e03f0f95
  15. Feb 17, 2018
  16. Feb 15, 2018
  17. Feb 13, 2018
  18. Feb 12, 2018
Loading