Skip to content
Snippets Groups Projects
  1. 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
      687ab7ae
  2. Dec 30, 2017
    • Corey Farrell's avatar
      core: Use macros to generate ao2_container callbacks where possible. · bc73337e
      Corey Farrell authored
      This uses AO2_STRING_FIELD_HASH_FN and AO2_STRING_FIELD_CMP_FN where
      possible in the Asterisk core.
      
      This removes CMP_STOP from the result of CMP_FN callbacks for the
      following structure types:
      * ast_bucket_metadata
      * ast_bucket_scheme
      * generic_monitor_instance_list (ccss.c)
      * ast_bucket_file (media_cache.c)
      * named_acl
      
      Change-Id: Ide4c1449a894bce70dea1fef664dade9b57578f1
      bc73337e
  3. Oct 26, 2017
    • Richard Mudgett's avatar
      codec.c: Defensively check the returned samples. · 2ca3dbb1
      Richard Mudgett authored
      Earlier versions of the codec_opus samples_count callback can return
      negative error values on undecodable frames.  This resulted in a divide by
      zero exception.
      
      * Added a defensive check in ast_codec_samples_count() for a "negative"
      samples count return value.  Log the event and set the count to zero.
      
      ASTERISK-27194
      
      Change-Id: Icf69350307ecbbc80a3d74de46af9bd80ea17819
      2ca3dbb1
  4. Apr 25, 2017
    • Mark Michelson's avatar
      SDP: Ensure SDPs "merge" properly. · 32b3e36c
      Mark Michelson authored
      The gist of this work ensures that when a remote SDP is received, it is
      merged properly with the local capabilities. The remote SDP is converted
      into a stream topology. That topology is then merged with the current
      local topology on the SDP state. That new merged topology is then used
      to create an SDP. Finally, adjustments are made to RTP instances based
      on knowledge gained from the remote SDP.
      
      There are also a battery of tests in this commit that ensure that some
      basic SDP merges work as expected.
      
      While this may not sound like a big change, it has the property that it
      caused lots of ancillary changes.
      
      * The remote SDP is no longer stored on the SDP state. Biggest reason:
        there's no need for it. The remote SDP is used at the time it is being
        set and nowhere else.
      
      * Some new SDP APIs were added in order to find attributes and convert
        generic SDP attributes into rtpmap structures.
      
      * Writing tests made me realize that retrieving a value from an SDP
        options structure, the SDP options needs to be made const.
      
      * The SDP state machine was essentially gutted by a previous commit.
        Initially, I attempted to reinstate it, but I found that as it had
        been defined, it was not all that useful. What was more useful was
        knowing the role we play in SDP negotiation, so the SDP state machine
        has been transformed into an indicator of role.
      
      * Rather than storing separate local and joint stream state
        capabilities, it makes more sense to keep track of current stream
        state and update it as things change.
      
      Change-Id: I5938c2be3c6f0a003aa88a39a59e0880f8b2df3d
      32b3e36c
  5. 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
  6. Jun 29, 2016
    • George Joseph's avatar
      codecs: Fix ABI incompatibility created by adding format_name to ast_codec · 4045e6d8
      George Joseph authored
      Adding format_name even to the end of ast_codec caused issued with
      binary codec modules because the pointer would be garbage in asterisk
      when they registered.  So, the ast_codec structure was reverted and an
      internal_ast_codec structure was created just for use in codec.c.  A new
      internal-only API was also added (__ast_codec_register_with_format) so
      that codec_builtin could register codecs with the format_name in a
      separate parameter rather than in the ast_codec structure.
      
      ASTERISK-26144 #close
      Reported-by: Alexei Gradinari
      
      Change-Id: I6df1b08f6a6ae089db23adfe1ebc8636330265ba
      4045e6d8
  7. Jun 03, 2016
    • George Joseph's avatar
      ari/resource_channels: Add 'formats' to channel create/originate · a2f820e8
      George Joseph authored
      If you create a local channel and don't specify an originator channel
      to take capabilities from, we automatically add all audio formats to
      the new channel's capabilities. When we try to make the channel
      compatible with another, the "best format" functions pick the best
      format available, which in this case will be slin192.  While this is
      great for preserving quality, it's the worst for performance and
      overkill for the vast majority of applications.
      
      In the absense of any other information, adding all formats is the
      correct thing to do and it's not always possible to supply an
      originator so a new parameter 'formats' has been added to the channel
      create/originate functions. It's just a comma separated list of formats
      to make availalble for the channel. Example: "ulaw,slin,slin16".
      'formats' and 'originator' are mutually exclusive.
      
      To facilitate determination of format names, the format name has been
      added to "core show codecs".
      
      ASTERISK-26070 #close
      
      Change-Id: I091b23ecd41c1b4128d85028209772ee139f604b
      a2f820e8
  8. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  9. Mar 26, 2015
  10. Feb 21, 2015
  11. Dec 12, 2014
  12. Jul 20, 2014
Loading