Skip to content
Snippets Groups Projects
  1. Mar 03, 2019
    • sungtae kim's avatar
      bridging: Add creation timestamps · 3638c433
      sungtae kim authored
      This small feature will help to checking the bridge's status to
      figure out which bridge is in old/zombie or not. Also added
      detail items for the 'bridge show *' cli to provide more detail
      info. And added creation item to the ARI as well.
      
      ASTERISK-28279
      
      Change-Id: I460238c488eca4d216b9176576211cb03286e040
      3638c433
  2. Feb 27, 2019
    • Kevin Harwell's avatar
      res_pjsip_registrar: blocked threads on reliable transport shutdown take 3 · 930a7fe9
      Kevin Harwell authored
      When a contact was removed by the registrar it did not always check to see if
      the circumstances involved a monitored reliable transport. For instance, if the
      'remove_existing' option was set to 'true' then when existing contacts were
      removed due to 'max_contacts' being reached, those existing contacts being
      removed did not unregister the transport monitor.
      
      Also, it was possible to add more than one monitor on a reliable transport for
      a given aor and contact.
      
      This patch makes it so all contact removals done by the registrar also remove
      any associated transport monitors if necessary. It also makes it so duplicate
      monitors cannot be added for a given transport.
      
      ASTERISK-28213
      
      Change-Id: I94b06f9026ed177d6adfd538317c784a42c1b17a
      930a7fe9
  3. Feb 20, 2019
    • George Joseph's avatar
      Core: Increase AST_PBX_MAX_STACK to 512 if not LOW_MEMORY · bc8dead6
      George Joseph authored
      The current settings AST_PBX_MAX_STACK is 128 entries which is
      too low for some FreePBX installations with complex parking
      arrangements.  Increased to 512 if LOW_MEMORY is not defined.
      
      ASTERISK-28300
      
      Change-Id: I7c4b540bc92e6642df0f3da639b003f7da8b1299
      bc8dead6
    • George Joseph's avatar
      taskprocessor: Enable subsystems and overload by subsystem · c2adeb9d
      George Joseph authored
      To prevent one subsystem's taskprocessors from causing others
      to stall, new capabilities have been added to taskprocessors.
      
      * Any taskprocessor name that has a '/' will have the part
        before the '/' saved as its "subsystem".
        Examples:
        "sorcery/acl-0000006a" and "sorcery/aor-00000019"
        will be grouped to subsystem "sorcery".
        "pjsip/distributor-00000025" and "pjsip/distributor-00000026"
        will bn grouped to subsystem "pjsip".
        Taskprocessors with no '/' have an empty subsystem.
      
      * When a taskprocessor enters high-water alert status and it
        has a non-empty subsystem, the subsystem alert count will
        be incremented.
      
      * When a taskprocessor leaves high-water alert status and it
        has a non-empty subsystem, the subsystem alert count will be
        decremented.
      
      * A new api ast_taskprocessor_get_subsystem_alert() has been
        added that returns the number of taskprocessors in alert for
        the subsystem.
      
      * A new CLI command "core show taskprocessor alerted subsystems"
        has been added.
      
      * A new unit test was addded.
      
      REMINDER: The taskprocessor code itself doesn't take any action
      based on high-water alerts or overloading.  It's up to taskprocessor
      users to check and take action themselves.  Currently only the pjsip
      distributor does this.
      
      * A new pjsip/global option "taskprocessor_overload_trigger"
        has been added that allows the user to select the trigger
        mechanism the distributor uses to pause accepting new requests.
        "none": Don't pause on any overload condition.
        "global": Pause on ANY taskprocessor overload (the default and
        current behavior)
        "pjsip_only": Pause only on pjsip taskprocessor overloads.
      
      * The core pjsip pool was renamed from "SIP" to "pjsip" so it can
        be properly grouped into the "pjsip" subsystem.
      
      * stasis taskprocessor names were changed to "stasis" as the
        subsystem.
      
      * Sorcery core taskprocessor names were changed to "sorcery" to
        match the object taskprocessors.
      
      Change-Id: I8c19068bb2fc26610a9f0b8624bdf577a04fcd56
      c2adeb9d
    • Kevin Harwell's avatar
      ARI event type filtering · 8681fc9d
      Kevin Harwell authored
      Event type filtering is now enabled, and configurable per application. An app is
      now able to specify which events are sent to the application by configuring an
      allowed and/or disallowed list(s). This can be done by issuing the following:
      
      PUT /applications/{applicationName}/eventFilter
      
      And then enumerating the allowed/disallowed event types as a body parameter.
      
      ASTERISK-28106
      
      Change-Id: I9671ba1fcdb3b6c830b553d4c5365aed5d588d5b
      8681fc9d
  4. Feb 19, 2019
    • Kevin Harwell's avatar
      json.c/strings.c - Add a couple of utility functions · 8f1b3edd
      Kevin Harwell authored
      Added 'ast_json_object_string_get' to the JSON wrapper in order to make it a
      little easier to retrieve a string field from the JSON object.
      
      Also added an 'ast_strings_equal' function that safely checks (checks for NULLs)
      for equality between two strings.
      
      Change-Id: I26f0a16d61537505eb41b4b05ef2e6d67fc2541b
      8f1b3edd
  5. Feb 13, 2019
    • Sungtae Kim's avatar
      res_pjsip_session Added rtcp stats result vector into the session · 7e1d881d
      Sungtae Kim authored
      Currently, the Asterisk's pjsip_session module does not keeping the
      rtcp's stats info after it was removed. But by adding the results
      vector and keeping it until session is destroying, it can give more
      useful information for other modules.
      
      ASTERISK-28253
      
      Change-Id: Ib25c2d3fc4da084aecfde2a82c1b1d733bd64fa5
      7e1d881d
  6. Feb 07, 2019
    • Joshua Colp's avatar
      res_odbc: Add basic query logging. · 54a912b2
      Joshua Colp authored
      When Asterisk is connected and used with a database the response
      time of the database can cause problems in Asterisk if it is long.
      Normally the only way to see this problem would be to retrieve a
      backtrace from Asterisk and examine where things are blocked, or
      examine the database to see if there is any indication of a
      problem.
      
      This change adds some basic query logging to make it easier to
      investigate such a problem. When logging is enabled res_odbc will
      now keep track of the number of queries executed, as well as the
      query that has taken the longest time to execute. There is also
      an option which will cause a WARNING message to be output if a
      query takes longer than a configurable amount of time to execute.
      
      This makes it easier and clearer for users that their database may
      be experiencing a problem that could impact Asterisk.
      
      ASTERISK-28277
      
      Change-Id: I173cf4928b10754478a6a8c27dfa96ede0f058a6
      54a912b2
  7. Jan 28, 2019
    • George Joseph's avatar
      media_index.c: Refactored so it doesn't cache the index · 7071e9d6
      George Joseph authored
      Testing revealed that the cache added no benefit but that it could
      consume excessive memory.
      
      Two new index related functions were created:
      ast_sounds_get_index_for_file() and ast_media_index_update_for_file()
      which restrict index updating to specific sound files.
      
      The original ast_sounds_get_index() and ast_media_index_update()
      calls are still available but since they no longer cache the results
      internally, developers should re-use an index they may already have
      instead of calling ast_sounds_get_index() repeatedly.  If information
      for only a single file is needed, ast_sounds_get_index_for_file()
      should be called instead of ast_sounds_get_index().
      
      The media_index directory scan code was elimininated in favor of
      using the existing ast_file_read_dirs() function.
      
      Since there's no more cache, ast_sounds_index_init now only
      registers the sounds cli commands instead of generating the
      initial index and subscribing to stasis format register/unregister
      messages.
      
      "sounds" is no longer a valid target for the "module reload"
      command.
      
      Both the sounds cli commands and the sounds ari resources were
      refactored to only call ast_sounds_get_index() once per invocation
      and to use ast_sounds_get_index_for_file() when a specific sound
      file is requested.
      
      Change-Id: I1cef327ba1b0648d85d218b70ce469ad07f4aa8d
      7071e9d6
  8. Jan 22, 2019
    • Chris-Savinovich's avatar
      Test_cel: Fails when DONT_OPTIMIZE is off · 1c8378bb
      Chris-Savinovich authored
      A bug in GCC causes TEST_CEL to return failure under the following
      conditions:
      1. TEST_FRAMEWORK on
      2. DONT_OPTIMIZE off
      3. Fedora and Ubuntu
      4. GCC 8.2.1
      5. Test name: test_cel_dial_pickup
      6. There must exist a certain combination of multithreading.
      The bug affects arithmetic calculations when the optimization level
      is bigger than O1 and the -fpartial-inline flag is on. Provided these
      conditions, function ast_str_to_lower() fails to convert to lower case
      due to said function being of type force_inline.  The solution is to
      remove the "force_inline" type declaration from function ast_str_to_lower()
      
      Change-Id: Ied32e0071f12ed9d5f3b4cdd878b2532a1c769d7
      1c8378bb
  9. Jan 17, 2019
    • Joshua C. Colp's avatar
      stasis / manager / ari: Better filter messages. · 1323730f
      Joshua C. Colp authored
      Previously both AMI and ARI used a default route on
      their stasis message router to handle some of the
      messages for publishing out their respective
      connection. This caused messages to be given to
      their subscription that could not be formatted
      into AMI or JSON.
      
      This change adds an API call to the stasis message
      router which allows a default route to be set as well
      as formatters that the default route is expecting.
      This allows both AMI and ARI to specify that their
      default route only wants messages of their given
      formatter. By doing so stasis can more intelligently
      filter at publishing time so that they do not receive
      messages which will not be turned into AMI or JSON.
      
      ASTERISK-28244
      
      Change-Id: I65272819a53ce99f869181d1d370da559a7d1703
      1323730f
  10. Jan 14, 2019
    • mohitdhiman's avatar
      stasis/endpoint: Fix memory leak of channel_ids in ast_endpoint structure. · d60ee2ee
      mohitdhiman authored
      During Bridging of two channels if masquerade operation is performed on a
      channel (clone channel) which was created with endpoint details
      (ast_channel_alloc_with_endpoint()) and the original channel which is created
      without endpoint details (ast_channel_alloc()) then both the channels must
      exchange their endpoint details or else after masquerade when clone channel
      is being destroyed the endpoint cleanup callbacks will be destroyed too and
      after call completion unique_id of original channel will still be there in
      ast_endpoint structure's channel_ids container.
      
      ASTERISK-28197
      
      Change-Id: I97ce73da390af20fd082fb09d722a6fe9cb2f39d
      d60ee2ee
  11. Jan 11, 2019
    • Alexei Gradinari's avatar
      res_pjsip: add option to enable ContactStatus event when contact is updated · f0546d1d
      Alexei Gradinari authored
      The commit I2f97ebfa79969a36a97bb7b9afd5b6268cf1a07d removed sending out
      the ContactStatus AMI event when a contact is updated.
      Thist change broke things which rely on old behavior.
      
      This patch adds a new PJSIP global configuration option
      'send_contact_status_on_update_registration' to be able to preserve old
      ContactStatus behavior.
      By default new behavior, i.e. the ContactStatus event will not be sent when a
      device refreshes its registration.
      
      Change-Id: I706adf7584e7077eb6bde6d9799ca408bc82ce46
      f0546d1d
  12. Jan 05, 2019
    • Diederik de Groot's avatar
      RAII: Change order or variables in clang version · 7bd30905
      Diederik de Groot authored
      This prevents use-after-scope issues when unwinding the stack,
      which happens in reverse order. The varname variable needs to
      remain alive for the destruction to be able to access it.
      Issue was found using clang + address-sanitizer.
      
      ASTERISK-28232 #close
      
      Change-Id: I00811c34ae910836a5fb6d22304528aef92624db
      7bd30905
  13. Dec 26, 2018
  14. Dec 12, 2018
    • Joshua C. Colp's avatar
      stasis: Add statistics gathering in developer mode. · fe070936
      Joshua C. Colp authored
      This change adds statistics gathering to Stasis topics,
      subscriptions, and message types. These can be viewed using
      CLI commands and provide insight into how Stasis is used
      and how long certain operations take to execute.
      
      These are only available when Asterisk is compiled in
      developer mode and do not have any impact under normal
      operation.
      
      ASTERISK-28117
      
      Change-Id: I94411b53767f89ee01714daaecf0c2f1666e863f
      fe070936
  15. Dec 07, 2018
    • Sean Bright's avatar
      utils: Wrap socket() and pipe() to reduce syscalls · 6d69fb3c
      Sean Bright authored
      Some platforms provide an implementation of socket() and pipe2() that allow the
      caller to specify that the resulting file descriptors should be non-blocking.
      
      Using these allows us to potentially elide 3 calls into 1 by avoiding extraneous
      calls to fcntl() to set the O_NONBLOCK flag afterwards.
      
      In passing, change ast_alertpipe_init() to use pipe2() directly instead of the
      wrapper if it is available.
      
      Change-Id: I3ebe654fb549587537161506c6c950f4ab298bb0
      6d69fb3c
    • George Joseph's avatar
      stasis: Allow filtering by formatter · 3f3dd992
      George Joseph authored
      A subscriber can now indicate that it only wants messages
      that have formatters of a specific type.  For instance,
      manager can indicate that it only wants messages that have a
      "to_ami" formatter.  You can combine this with the existing
      filter for message type to get only messages with specific
      formatters or messages of specific types.
      
      ASTERISK-28186
      
      Change-Id: Ifdb7a222a73b6b56c6bb9e4ee93dc8a394a5494c
      3f3dd992
  16. Dec 03, 2018
    • Chris-Savinovich's avatar
      core: Merge malloc_trim patch · 58e50e56
      Chris-Savinovich authored
      We've had multiple opportunities where Richard Mudgett's
      malloc_trim patch has been useful. Let's get it
      pushed up to gerrit and merged.
      
      Since malloc_trim is only available in libc, an entry is
      added to configure.ac to create a definition for
      HAVE_MALLOC_TRIM.
      
      Change-Id: Ia38308c550149d9d6eae4ca414a649957de9700c
      58e50e56
    • Sungtae Kim's avatar
      res_pjsip: Patch for res_pjsip_* module load/reload crash · 8644511c
      Sungtae Kim authored
      The session_supplements for the pjsip makes crashes when the module
      load/unload.
      
      ASTERISK-28157
      
      Change-Id: I5b82be3a75d702cf1933d8d1417f44aa10ad1029
      8644511c
  17. Nov 26, 2018
    • George Joseph's avatar
      bridges: Remove reliance on stasis caching · 3667c5e1
      George Joseph authored
      * The bridging core no longer uses the stasis cache for bridge
        snapshots.  The latest bridge snapshot is now stored on the
        ast_bridge structure itself.
      
      * The following APIs are no longer available since the stasis cache
        is no longer used:
          ast_bridge_topic_cached()
          ast_bridge_topic_all_cached()
      
      * A topic pool is now used for individual bridge topics.
      
      * The ast_bridge_cache() function was removed since there's no
        longer a separate container of snapshots.
      
      * A new function "ast_bridges()" was created to retrieve the
        container of all bridges.  Users formerly calling
        ast_bridge_cache() can use the new function to iterate over
        bridges and retrieve the latest snapshot directly from the
        bridge.
      
      * The ast_bridge_snapshot_get_latest() function was renamed to
        ast_bridge_get_snapshot_by_uniqueid().
      
      * A new function "ast_bridge_get_snapshot()" was created to retrieve
        the bridge snapshot directly from the bridge structure.
      
      * The ast_bridge_topic_all() function now returns a normal topic
        not a cached one so you can't use stasis cache functions on it
        either.
      
      * The ast_bridge_snapshot_type() stasis message now has the
        ast_bridge_snapshot_update structure as it's data.  It contains
        the last snapshot and the new one.
      
      * cdr, cel, manager and ari have been updated to use the new
        arrangement.
      
      Change-Id: I7049b80efa88676ce5c4666f818fa18ad1985369
      3667c5e1
    • Joshua Colp's avatar
      stasis: Segment channel snapshot to reduce creation cost. · 50ac85cb
      Joshua Colp authored
      When a channel snapshot was created it used to be done
      from scratch, copying all data (many strings). This incurs
      a cost when doing so.
      
      This change segments the channel snapshot into different
      components which can be reused if unchanged from the
      previous snapshot creation, reducing the cost. In normal
      cases this results in some pointers being copied with
      reference count being bumped, some integers being set,
      and a string or two copied. The other benefit is that it
      is now possible to determine if a channel snapshot update
      is redundant and thus stop it before a message is published
      to stasis.
      
      The specific segments in the channel snapshot were split up
      based on whether they are changed together, how often they
      are changed, and their general grouping. In practice only
      1 (or 0) of the segments actually get changed in normal
      operation.
      
      Invalidation is done by setting a flag on the channel when
      the segment source is changed, forcing creation of a new
      segment when the channel snapshot is created.
      
      ASTERISK-28119
      
      Change-Id: I5d7ef3df963a88ac47bc187d73c5225c315f8423
      50ac85cb
    • Joshua Colp's avatar
      stasis: Use an implementation specific channel snapshot cache. · d0ccbb33
      Joshua Colp authored
      Channels no longer use the Stasis cache for channel snapshots. Instead
      they are stored in a hash table in stasis_channels which reduces the
      number of Stasis messages created and allows better storage.
      
      As a result the following APIs are no longer available since the stasis
      cache is no longer used:
      ast_channel_topic_cached()
      ast_channel_topic_all_cached()
      
      The ast_channel_cache_all() and ast_channel_cache_by_name() functions
      now return an ao2_container of ast_channel_snapshots rather than
      a container of stasis_messages therefore you can't (and don't need
      to) call stasis_cache functions on it.
      
      The ast_channel_topic_all() function now returns a normal topic not
      a cached one so you can't use stasis cache functions on it either.
      
      The ast_channel_snapshot_type() stasis message now has the
      ast_channel_snapshot_update structure as it's data. It contains the
      last snapshot and the new one.
      
      ast_channel_snapshot_get_latest() still returns the latest snapshot.
      
      The latest snapshot is now stored on the channel itself to eliminate
      cache hits when Stasis messages that have the snapshot as a payload
      are created.
      
      ASTERISK-28102
      
      Change-Id: I9334febff60a82d7c39703e49059fa3a68825786
      d0ccbb33
  18. Nov 21, 2018
  19. 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
  20. Nov 18, 2018
    • Joshua C. Colp's avatar
      stasis: Remove stringfields and lock from change message. · 56eb18f3
      Joshua C. Colp authored
      When a subscribe or unsubscribe occurs a message is published
      containing this information. This change makes it so that the
      message no longer uses stringfields or a lock, as both are not
      really needed for the message.
      
      Change-Id: I3f4831931d79f94fd979baf48048738df5dc1632
      56eb18f3
    • Joshua Colp's avatar
      stasis: Add internal filtering of messages. · 3077ad0c
      Joshua Colp authored
      This change adds the ability for subscriptions to indicate
      which message types they are interested in accepting. By
      doing so the filtering is done before being dispatched
      to the subscriber, reducing the amount of work that has
      to be done.
      
      This is optional and if a subscriber does not add
      message types they wish to accept and set the subscription
      to selective filtering the previous behavior is preserved
      and they receive all messages.
      
      There is also the ability to explicitly force the reception
      of all messages for cases such as AMI or ARI where a large
      number of messages are expected that are then generically
      converted into a different format.
      
      ASTERISK-28103
      
      Change-Id: I99bee23895baa0a117985d51683f7963b77aa190
      3077ad0c
  21. Nov 05, 2018
    • Joshua Colp's avatar
      stasis: Clarify lifetime of topics. · bf579222
      Joshua Colp authored
      As mentioned in the comment I've added in the code there is no
      ability to unsubscribe all subscribers from a topic and explicitly
      destroy it. This is not currently a problem as we have two types of
      topics:
      
      Long lived topics which exist for the lifetime of the system.
      Ephemeral topics which feed a long lived topic.
      
      In the case of the ephemeral topics there is no subscriber which does
      not have its lifetime managed by the same entity that has created
      the topic. This ensures that when the topic is being unreferenced the
      subscribers are also unsubscribed and destroyed, allowing the topic
      to ultimately be destroyed as well.
      
      Change-Id: Ic5e244da7b16b1895ba1fc5ece481ebba5809c9a
      bf579222
  22. Oct 30, 2018
    • Alexei Gradinari's avatar
      pjsip: new endpoint's options to control Connected Line updates · eee93598
      Alexei Gradinari authored
      This patch adds new options 'trust_connected_line' and 'send_connected_line'
      to the endpoint.
      
      The option 'trust_connected_line' is to control if connected line updates
      are accepted from this endpoint.
      
      The option 'send_connected_line' is to control if connected line updates
      can be sent to this endpoint.
      
      The default value is 'yes' for both options.
      
      Change-Id: I16af967815efd904597ec2f033337e4333d097cd
      eee93598
  23. Oct 26, 2018
    • Torrey Searle's avatar
      res_pjsip_session: add new flag use_callerid_contact · cac4ccef
      Torrey Searle authored
      Add a new global flag to res_pjsip to allow the callerid to be used
      as the username in the contact header.  This allows chan_pjsip to have
      the same behavour as chan_sip
      
      ASTERISK-28087 #close
      
      Change-Id: I9a720e058323f6862a91c62f8a8c1a4b5c087b95
      cac4ccef
  24. Oct 24, 2018
    • George Joseph's avatar
      bridge_softmix: Add SDP "label" attribute to streams · 8d1c6bb6
      George Joseph authored
      Adding the "label" attribute used for participant info correlation
      was previously done in app_confbridge but it wasn't working
      correctly because it didn't have knowledge about which video
      streams belonged to which channel.  Only bridge_softmix has that
      data so now it's set when the bridge topology is changed.
      
      ASTERISK-28107
      
      Change-Id: Ieddeca5799d710cad083af3fcc3e677fa2a2a499
      8d1c6bb6
    • Nick French's avatar
      res_pjsip: Implement additional SIP RFCs for Google Voice trunk compatability · 37b2e686
      Nick French authored
      This change implements a few different generic things which were brought
      on by Google Voice SIP.
      
      1.  The concept of flow transports have been introduced.  These are
      configurable transports in pjsip.conf which can be used to reference a
      flow of signaling to a target.  These have runtime configuration that can
      be changed by the signaling itself (such as Service-Routes and
      P-Preferred-Identity).  When used these guarantee an individual connection
      (in the case of TCP or TLS) even if multiple flow transports exist to the
      same target.
      
      2.  Service-Routes (RFC 3608) support has been added to the outbound
      registration module which when received will be stored on the flow
      transport and used for requests referencing it.
      
      3.  P-Associated-URI / P-Preferred-Identity (RFC 3325) support has been
      added to the outbound registration module.  If a P-Associated-URI header
      is received it will be used on requests as the P-Preferred-Identity.
      
      4.  Configurable outbound extension support has been added to the outbound
      registration module.  When set the extension will be placed in the
      Supported header.
      
      5.  Header parameters can now be configured on an outbound registration
      which will be placed in the Contact header.
      
      6.  Google specific OAuth / Bearer token authentication
      (draft-ietf-sipcore-sip-authn-02) has been added to the outbound
      registration module.
      
      All functionality changes are controlled by pjsip.conf configuration
      options and do not affect non-configured pjsip endpoints otherwise.
      
      ASTERISK-27971 #close
      
      Change-Id: Id214c2d1c550a41fcf564b7df8f3da7be565bd58
      37b2e686
  25. Oct 19, 2018
    • Corey Farrell's avatar
      astobj2: Eliminate legacy container allocation macros. · 687ab7ae
      Corey Farrell authored
      These macros have been documented as legacy for a long time but are
      still used in new code because they exist.  Remove all references to:
      * ao2_container_alloc_options
      * ao2_t_container_alloc_options
      * ao2_t_container_alloc
      
      These macro's are also removed.  Only ao2_container_alloc remains due to
      it's use in over 100 places.
      
      Change-Id: I1a26258b5bf3deb081aaeed11a0baa175c933c7a
      Unverified
      687ab7ae
    • 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
      Unverified
      4c19b949
  26. Oct 17, 2018
  27. Oct 04, 2018
    • Corey Farrell's avatar
      loader: Flag module as declined in all cases where it fails to load. · c8ee1a18
      Corey Farrell authored
      This has no effect on startup since AST_MODULE_LOAD_FAILURE aborts
      startup, but it's possible for this code to be returned on manual load
      of a module after startup.
      
      It is an error for a module to not have a load callback but this is not
      a fatal system error.  In this case flag the module as declined, return
      AST_MODULE_LOAD_FAILURE only if a required module is broken.
      
      Expand doxygen documentation for AST_MODULE_LOAD_*.
      
      Change-Id: I3c030bb917f6e5a0dfd9d91491a4661b348cabf8
      Unverified
      c8ee1a18
  28. Oct 02, 2018
    • Corey Farrell's avatar
      loader: Improve error handling. · e4cf513f
      Corey Farrell authored
      * Display list of unavailable dependencies when they cause another
        module to fail loading.
      * When a module declines to load find all modules which depend on it so
        they can be declined and listed together.
      * Prevent retry of declined modules during startup.
      * When a module fails to dlopen try loading it with RTLD_LAZY so we can
        attempt to display the list of missing dependencies.
      
      These changes are meant to reduce logger spam that is caused when a
      module has many dependencies and declines to load.  This also fixes some
      error paths which failed to recognize required modules.
      
      Module load/start errors are delayed until the end of loader startup.
      
      Change-Id: I046052c71331c556c09d39f47a3b92975f3e1758
      Unverified
      e4cf513f
  29. Sep 28, 2018
    • Corey Farrell's avatar
      lock: Improve performance of DEBUG_THREADS. · 205c6be8
      Corey Farrell authored
      Add a volatile flag to lock tracking structures so we only need to use
      the global lock when first initializing tracking.
      
      Additionally add support for DEBUG_THREADS_LOOSE_ABI.  This is used by
      astobj2.c to eliminate storage for tracking fields when DEBUG_THREADS is
      not defined.
      
      Change-Id: Iabd650908901843e9fff47ef1c539f0e1b8cb13b
      Unverified
      205c6be8
  30. Sep 25, 2018
    • George Joseph's avatar
      configure.ac: Check for unbound version >= 1.5 · 1ba51b00
      George Joseph authored
      In order to do this and provide good feedback, a new macro was
      created (AST_EXT_LIB_EXTRA_CHECK) which does the normal check and
      path setups for the library then compiles, links and runs a supplied
      code fragment to do the final determination.  In this case, the
      final code fragment compares UNBOUND_VERSION_MAJOR
      and UNBOUND_VERSION_MINOR to determine if they're greater than or
      equal to 1.5.
      
      Since we require version 1.5, some code in res_resolver_unbound
      was also simplified.
      
      ASTERISK-28045
      Reported by: Samuel Galarneau
      
      Change-Id: Iee94ad543cd6f8b118df8c4c7afd9c4e2ca1fa72
      1ba51b00
Loading