Skip to content
Snippets Groups Projects
  1. Sep 21, 2015
  2. Sep 19, 2015
  3. Sep 18, 2015
  4. Sep 17, 2015
    • Richard Mudgett's avatar
      CHAOS: res_pjsip_diversion avoid crash if allocation fails · e1927915
      Richard Mudgett authored
      Validate ast_malloc buffer returned before using it in
      set_redirecting_value().
      
      ASTERISK-25323
      
      Change-Id: I15d2ed7cb0546818264c0bf251aa40adeae83253
      e1927915
    • Kevin Harwell's avatar
      app_queue: AgentComplete event has wrong reason · 729a4325
      Kevin Harwell authored
      When a queued caller transfers an agent to another extension sometimes the
      raised AgentComplete event has a reason of "caller" and sometimes "transfer".
      Since a transfer has taken place this should always be transfer. This occurs
      because sometimes the stasis hangup event arrives before the transfer event
      thus writing a different reason out.
      
      With this patch, when a hangup event is received during a transfer it will
      check to see if the channel that is hanging up is part of a transfer. If so
      it will return and let the subsequently received transfer event handler take
      care of the cleanup.
      
      ASTERISK-25399 #close
      
      Change-Id: Ic63c49bd9a5ed463ea7a032fd2ea3d63bc81a50d
      729a4325
    • Scott Griepentrog's avatar
      PJSIP: avoid crash when getting rtp peer · 87f04d5a
      Scott Griepentrog authored
      Although unlikely, if the tech private is returned as
      a NULL, chan_pjsip_get_rtp_peer() would crash.
      
      ASTERISK-25323
      
      Change-Id: Ie231369bfa7da926fb2b9fdaac228261a3152e6a
      87f04d5a
    • Kevin Harwell's avatar
      app_queue: Crash when transferring · 63ede412
      Kevin Harwell authored
      During some transfer scenarios involving queues Asterisk would sometimes
      crash when trying to obtain a channel snapshot (could happen on caller or
      member channels). This occurred because the underlying channel had already
      disappeared when trying to obtain the latest snapshot.
      
      This patch adds a reference to both the member and caller channels that
      extends to the lifetime of the queue'd call, thus making sure the channels
      will always exist when retrieving the latest snapshots.
      
      ASTERISK-25185 #close
      Reported by: Etienne Lessard
      
      Change-Id: Ic397fa68fb4ff35fbc378e745da9246a7b552128
      63ede412
    • Mark Michelson's avatar
      res_pjsip_pubsub: Eliminate race during initial NOTIFY. · e4739672
      Mark Michelson authored
      There is a slim chance of a race condition occurring where two threads
      can both attempt to manipulate the same area.
      
      Thread A can be handling an incoming initial SUBSCRIBE request. Thread A
      lets the specific subscription handler know that the subscription has
      been established.
      
      At this point, Thread B may detect a state change on the subscribed
      resource and queue up a notification task on Thread C, the subscription
      serializer thread.
      
      Now Thread A attempts to generate the initial NOTIFY request to send to
      the subscriber at the same time that Thread C attempts to generate a
      state change NOTIFY request to send to the subscriber.
      
      The result is that Threads A and C can step on the same memory area,
      resulting in a crash. The crash has been observed as happening when
      attempting to allocate more space to hold the body for the NOTIFY.
      
      The solution presented here is to queue the subscription establishment
      and initial NOTIFY generation onto the subscription serializer thread
      (Thread C in the above scenario). This way, there is no way that a state
      change notification can occur before the initial NOTIFY is sent, and if
      there is a quick succession of NOTIFYs, we can guarantee that the two
      NOTIFY requests will be sent in succession.
      
      Change-Id: I5a89a77b5f2717928c54d6efb9955e5f6f5cf815
      e4739672
  5. Sep 15, 2015
    • Mark Michelson's avatar
      scheduler: Use queue for allocating sched IDs. · 0a74c803
      Mark Michelson authored
      It has been observed that on long-running busy systems, a scheduler
      context can eventually hit INT_MAX for its assigned IDs and end up
      overflowing into a very low negative number. When this occurs, this can
      result in odd behaviors, because a negative return is interpreted by
      callers as being a failure. However, the item actually was successfully
      scheduled. The result may be that a freed item remains in the scheduler,
      resulting in a crash at some point in the future.
      
      The scheduler can overflow because every time that an item is added to
      the scheduler, a counter is bumped and that counter's current value is
      assigned as the new item's ID.
      
      This patch introduces a new method for assigning scheduler IDs. Instead
      of assigning from a counter, a queue of available IDs is maintained.
      When assigning a new ID, an ID is pulled from the queue. When a
      scheduler item is released, its ID is pushed back onto the queue. This
      way, IDs may be reused when they become available, and the growth of ID
      numbers is directly related to concurrent activity within a scheduler
      context rather than the uptime of the system.
      
      Change-Id: I532708eef8f669d823457d7fefdad9a6078b99b2
      0a74c803
  6. Sep 11, 2015
  7. Sep 10, 2015
  8. Sep 09, 2015
  9. Sep 08, 2015
Loading