Skip to content
Snippets Groups Projects
  1. 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
  2. Apr 23, 2015
    • Diederik de Groot's avatar
      Clang: change previous tautological-compare fixes. · ca719316
      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
      ca719316
  3. 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
  4. Apr 09, 2015
    • Matthew Jordan's avatar
      clang compiler warnings: Fix autological comparisons · ea009872
      Matthew Jordan authored
      This fixes autological comparison warnings in the following:
       * chan_skinny: letohl may return a signed or unsigned value, depending on the
         macro chosen
       * func_curl: Provide a specific cast to CURLoption to prevent mismatch
       * cel: Fix enum comparisons where the enum can never be negative
       * enum: Fix comparison of return result of dn_expand, which returns a signed
         int value
       * event: Fix enum comparisons where the enum can never be negative
       * indications: tone_data.freq1 and freq2 are unsigned, and hence can never be
         negative
       * presencestate: Use the actual enum value for INVALID state
       * security_events: Fix enum comparisons where the enum can never be negative
       * udptl: Don't bother to check if the return value from encode_length is less
         than 0, as it returns an unsigned int
       * translate: Since the parameters are unsigned int, don't bother checking
         to see if they are negative. The cast to unsigned int would already blow
         past the matrix bounds.
       * res_pjsip_exten_state: Use a temporary value to cache the return of
         ast_hint_presence_state
       * res_stasis_playback: Fix enum comparisons where the enum can never be
         negative
       * res_stasis_recording: Add an enum value for the case where the recording
         operation is in error; fix enum comparisons
       * resource_bridges: Use enum value as opposed to -1
       * resource_channels: Use enum value as opposed to -1
      
      Review: https://reviewboard.asterisk.org/r/4533
      ASTERISK-24917
      Reported by: dkdegroot
      patches:
        rb4533.patch submitted by dkdegroot (License 6600)
      ........
      
      Merged revisions 434469 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 434470 from http://svn.asterisk.org/svn/asterisk/branches/13
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434471 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ea009872
  5. Jun 27, 2014
  6. May 23, 2014
  7. May 22, 2014
    • Matthew Jordan's avatar
      res_corosync: Update module to work with Stasis (and compile) · 9cee08f5
      Matthew Jordan authored
      This patch fixes res_corosync such that it works with Asterisk 12. This
      restores the functionality that was present in previous versions of
      Asterisk, and ensures compatibility with those versions by restoring the
      binary message format needed to pass information from/to them.
      
      The following changes were made in the core to support this:
       * The event system has been partially restored. All event definition and
         event types in this patch were pulled from Asterisk 11. Previously, we had
         hoped that this information would live in res_corosync; however, the
         approach in this patch seems to be better for a few reasons:
         (1) Theoretically, ast_events can be used by any module as a binary
             representation of a Stasis message. Given the structure of an ast_event
             object, that information has to live in the core to be used universally.
             For example, defining the payload of a device state ast_event in
             res_corosync could result in an incompatible device state representation
             in another module.
         (2) Much of this representation already lived in the core, and was not
             easily extensible.
         (3) The code already existed. :-)
       * Stasis message types now have a message formatter that converts their
         payload to an ast_event object.
       * Stasis message forwarders now handle forwarding to themselves. Previously
         this would result in an infinite recursive call. Now, this simply creates a
         new forwarding object with no forwards set up (as it is the thing it is
         forwarding to). This is advantageous for res_corosync, as returning NULL
         would also imply an unrecoverable error. Returning a subscription in this
         case allows for easier handling of message types that are published directly
         to an aggregate topic that has forwarders.
      
      Review: https://reviewboard.asterisk.org/r/3486/
      
      ASTERISK-22912 #close
      ASTERISK-22372 #close
      ........
      
      Merged revisions 414330 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414331 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9cee08f5
  8. May 09, 2014
  9. Sep 10, 2013
  10. Aug 17, 2013
  11. May 03, 2013
  12. May 02, 2013
  13. Apr 30, 2013
  14. Apr 04, 2013
  15. Mar 04, 2013
  16. Jan 02, 2013
    • Automerge script's avatar
      Merged revisions 378322 via svnmerge from · 675914bb
      Automerge script authored
      file:///srv/subversion/repos/asterisk/trunk
      
      ................
        r378322 | mjordan | 2013-01-02 12:11:59 -0600 (Wed, 02 Jan 2013) | 33 lines
        
        Prevent exhaustion of system resources through exploitation of event cache
        
        Asterisk maintains an internal cache for devices in the event subsystem. The
        device state cache holds the state of each device known to Asterisk, such that
        consumers of device state information can query for the last known state for
        a particular device, even if it is not part of an active call. The concept of
        a device in Asterisk can include entities that do not have a physical
        representation. One way that this occurred was when anonymous calls are allowed
        in Asterisk. A device was automatically created and stored in the cache for
        each anonymous call that occurred; this was possible in the SIP and IAX2
        channel drivers and through channel drivers that utilized the
        res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
        are never removed from the system, allowing anonymous calls to potentially
        exhaust a system's resources.
        
        This patch changes the event cache subsystem and device state management to
        no longer cache devices that are not associated with a physical entity.
        
        (issue ASTERISK-20175)
        Reported by: Russell Bryant, Leif Madsen, Joshua Colp
        Tested by: kmoore
        patches:
          event-cachability-3.diff uploaded by jcolp (license 5000)
        ........
        
        Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
        ........
        
        Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
        ........
        
        Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11
      ................
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      675914bb
    • Matthew Jordan's avatar
      Prevent exhaustion of system resources through exploitation of event cache · 8fb5bdce
      Matthew Jordan authored
      Asterisk maintains an internal cache for devices in the event subsystem. The
      device state cache holds the state of each device known to Asterisk, such that
      consumers of device state information can query for the last known state for
      a particular device, even if it is not part of an active call. The concept of
      a device in Asterisk can include entities that do not have a physical
      representation. One way that this occurred was when anonymous calls are allowed
      in Asterisk. A device was automatically created and stored in the cache for
      each anonymous call that occurred; this was possible in the SIP and IAX2
      channel drivers and through channel drivers that utilized the
      res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
      are never removed from the system, allowing anonymous calls to potentially
      exhaust a system's resources.
      
      This patch changes the event cache subsystem and device state management to
      no longer cache devices that are not associated with a physical entity.
      
      (issue ASTERISK-20175)
      Reported by: Russell Bryant, Leif Madsen, Joshua Colp
      Tested by: kmoore
      patches:
        event-cachability-3.diff uploaded by jcolp (license 5000)
      ........
      
      Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
      ........
      
      Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8fb5bdce
  17. Dec 11, 2012
  18. Oct 02, 2012
  19. Jul 31, 2012
  20. Jul 30, 2012
    • Russell Bryant's avatar
      Add a "corosync ping" CLI command. · fd111465
      Russell Bryant authored
      This patch adds a new CLI command to the res_corosync module.  It is primarily
      used as a debugging tool.  It lets you fire off an event which will cause
      res_corosync on other nodes in the cluster to place messages into the logger if
      everything is working ok.  It verifies that the corosync communication is
      working as expected.
      
      I didn't put anything in the CHANGES file for this, because this module is new
      in Asterisk 11.  There is already a generic "res_corosync new module" entry in
      there so I figure that covers it just fine.
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370535 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fd111465
  21. Jun 15, 2012
    • Kevin P. Fleming's avatar
      Multiple revisions 369001-369002 · 166b4e2b
      Kevin P. Fleming authored
      ........
        r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
        
        Add support-level indications to many more source files.
        
        Since we now have tools that scan through the source tree looking for files
        with specific support levels, we need to ensure that every file that is
        a component of a 'core' or 'extended' module (or the main Asterisk binary)
        is explicitly marked with its support level. This patch adds support-level
        indications to many more source files in tree, but avoids adding them to
        third-party libraries that are included in the tree and to source files
        that don't end up involved in Asterisk itself.
      ........
        r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
        
        Add a script to enable finding source files without support-levels defined.
      ........
      
      Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      166b4e2b
  22. Jun 04, 2012
    • Mark Michelson's avatar
      Merge changes dealing with support for Digium phones. · 14a98556
      Mark Michelson authored
      Presence support has been added. This is accomplished by
      allowing for presence hints in addition to device state
      hints. A dialplan function called PRESENCE_STATE has been
      added to allow for setting and reading presence. Presence
      can be transmitted to Digium phones using custom XML
      elements in a PIDF presence document.
      
      Voicemail has new APIs that allow for moving, removing,
      forwarding, and playing messages. Messages have had a new
      unique message ID added to them so that the APIs will work
      reliably. The state of a voicemail mailbox can be obtained
      using an API that allows one to get a snapshot of the mailbox.
      A voicemail Dialplan App called VoiceMailPlayMsg has been
      added to be able to play back a specific message.
      
      Configuration hooks have been added. Configuration hooks
      allow for a piece of code to be executed when a specific
      configuration file is loaded by a specific module. This is
      useful for modules that are dependent on the configuration
      of other modules.
      
      chan_sip now has a public method that allows for a custom
      SIP INFO request to be sent mid-dialog. Digium phones use
      this in order to display progress bars when files are played.
      
      Messaging support has been expanded a bit. The main
      visible difference is the addition of an AMI action
      MessageSend.
      
      Finally, a ParkingLots manager action has been added in order
      to get a list of parking lots.
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@368435 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      14a98556
  23. May 10, 2012
  24. Apr 20, 2012
  25. Mar 22, 2012
  26. Mar 02, 2012
  27. Sep 22, 2011
  28. Sep 13, 2011
  29. Jun 15, 2011
    • Richard Mudgett's avatar
      Merged revisions 323669-323670 via svnmerge from · b2d0ea5f
      Richard Mudgett authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r323669 | rmudgett | 2011-06-15 11:43:18 -0500 (Wed, 15 Jun 2011) | 21 lines
        
        [regression] Voicemail MWI is no longer sent.
        
        When leaving a voicemail, the MWI message is never sent.  The same thing
        happens when checking a voicemail and marking it as read.
        
        If you restart Asterisk, everything comes up at that state correctly, but
        changes to the messages in voicemail causes the light to not be set
        appropriately.  Very easy to reproduce.
        
        * Made ast_event_check_subscriber() return TRUE if there are ANY
        subscribers to an event type when there are no restricting ie values
        passed.  This allows an event being queued to be queued.
        
        (closes issue ASTERISK-18002)
        Reported by: lmadsen
        Tested by: lmadsen, irroot
        Patches:
             jira_asterisk_18002_v1.8.patch uploaded by rmudgett (License #5621)
        
        (closes issue ASTERISK-18019)
      ........
        r323670 | rmudgett | 2011-06-15 11:43:31 -0500 (Wed, 15 Jun 2011) | 7 lines
        
        Add a test to the event unit tests to catch ASTERISK-18002.
        
        The new tests check to see if there are ANY subscribers to the event type
        when ast_event_check_subscriber() is not passed any specific ie values.
        
        (issue ASTERISK-18002)
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323671 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b2d0ea5f
    • Richard Mudgett's avatar
      Merged revisions 323456 via svnmerge from · 70d95279
      Richard Mudgett authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r323456 | rmudgett | 2011-06-14 19:50:20 -0500 (Tue, 14 Jun 2011) | 1 line
        
        Add missing break in ast_event_get_cached().
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@323457 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      70d95279
  30. Jun 03, 2011
    • Richard Mudgett's avatar
      Merged revisions 321871 via svnmerge from · 85aa126b
      Richard Mudgett authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r321871 | rmudgett | 2011-06-03 15:58:13 -0500 (Fri, 03 Jun 2011) | 27 lines
        
        Event subscription fixes.
        
        Must commit the subscription fixes together with the integration
        subscription tests.  The subscription fixes cause an erroneously passing
        test to fail.  The new subscription tests detect errors without the
        subscription fixes.
        
        * Added missing event_names[] table entry.
        
        * Reworked ast_event_check_subscriber()/match_sub_ie_val_to_event() to
        correctly detect if a subscriber exists for the proposed event.
        
        * Made match_ie_val() and match_sub_ie_val_to_event() check the buffer
        length for RAW payload types.
        
        * Fixed error handling memory leak in ast_event_sub_activate(),
        ast_event_unsubscribe(), and ast_event_queue().
        
        * Made ast_event_new() and ast_event_check_subscriber() better protect
        themselves from an invalid payload type.
        
        * Added container lock protection between removing old cache events and
        adding the new cached event in
        ast_event_queue_and_cache()/event_update_cache().
        
        * Added new event subscription tests.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321872 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      85aa126b
    • Richard Mudgett's avatar
      Merged revisions 321812-321813 via svnmerge from · 397c379a
      Richard Mudgett authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ........
        r321812 | rmudgett | 2011-06-03 14:55:21 -0500 (Fri, 03 Jun 2011) | 1 line
        
        Correct IAX2 and SIP event subscription description string.
      ........
        r321813 | rmudgett | 2011-06-03 14:56:09 -0500 (Fri, 03 Jun 2011) | 1 line
        
        Constify subscription description parameter string.
      ........
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@321814 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      397c379a
  31. Nov 20, 2010
    • Russell Bryant's avatar
      Merged revisions 295711 via svnmerge from · 9fbbdfb2
      Russell Bryant authored
      https://origsvn.digium.com/svn/asterisk/branches/1.8
      
      ................
        r295711 | russell | 2010-11-19 18:50:00 -0600 (Fri, 19 Nov 2010) | 36 lines
        
        Merged revisions 295710 via svnmerge from 
        https://origsvn.digium.com/svn/asterisk/branches/1.6.2
        
        ........
          r295710 | russell | 2010-11-19 18:45:51 -0600 (Fri, 19 Nov 2010) | 29 lines
          
          Fix cache of device state changes for multiple servers.
          
          This patch addresses a regression where device states across multiple servers
          were not being processing completely correctly.  The code works to determine
          the overall state by looking at the last known state of a device on each
          server.  However, there was a regression due to some invasive rewrites of how
          the cache works that led to the cache only storing the last device state change
          for a device, regardless of which server it was on.
          
          The code is set up to cache device state change events by ensuring that each
          event in the cache has a unique device name + entity ID (server ID).  The code
          that was responsible for comparing raw information elements (which EID is)
          always returned a match due to a memcmp() with a length of 0.
          
          There isn't much code to fix the actual bug.  This patch also introduces a new
          CLI command that was very useful for debugging this problem.  The command
          allows you to dump the contents of the event cache.
          
          (closes issue #18284)
          Reported by: klaus3000
          Patches:
                issue18284.rev1.txt uploaded by russell (license 2)
          Tested by: russell, klaus3000
          
          (closes issue #18280)
          Reported by: klaus3000
          
          Review: https://reviewboard.asterisk.org/r/1012/
        ........
      ................
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@295712 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9fbbdfb2
  32. Jun 09, 2010
  33. Apr 22, 2010
    • Russell Bryant's avatar
      Add ast_event subscription unit test and fix some ast_event API bugs. · 52a8ddba
      Russell Bryant authored
      This patch introduces another test in test_event.c that exercises most of the
      subscription related ast_event API calls.  I made some minor additions to the
      existing event allocation test to increase API coverage by the test code.
      Finally, I made a list in a comment of API calls not yet touched by the test
      module as a to-do list for future test development.
      
      During the development of this test code, I discovered a number of bugs in
      the event API.
      
      1) subscriptions to AST_EVENT_ALL were not handled appropriately in a couple
         of different places.  The API allows a subscription to all event types,
         but with IE parameters, just as if it was a subscription to a specific
         event type.  However, the parameters were being ignored.  This affected
         ast_event_check_subscriber() and event distribution to subscribers.
      
      2) Some of the logic in ast_event_check_subscriber() for checking subscriptions
         against query parameters was wrong.
      
      Review: https://reviewboard.asterisk.org/r/617/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@258632 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      52a8ddba
Loading