Skip to content
Snippets Groups Projects
  1. Jun 05, 2015
  2. Jun 04, 2015
    • Joshua Colp's avatar
      res_sorcery_memory_cache: Implement expire_on_reload option. · 128fe4ce
      Joshua Colp authored
      This change implements the expire_on_reload option for memory caches.
      If enabled and a reload is performed all objects within the cache
      will be expired and the cache emptied.
      
      ASTERISK-25067
      Reported by: Matt Jordan
      
      Change-Id: Id46aa1957d660556700e689e195eed57c989b85e
      128fe4ce
    • Joshua Colp's avatar
      test_sorcery_memory_cache_thrash: Add unit tests for thrashing the memory cache. · 028edae8
      Joshua Colp authored
      This change adds a CLI command which can perform memory cache thrashing as well
      as unit tests which perform thrashing under the following configurations:
      
      1. Low number of unique objects that go stale after 1 second
      2. Low number of unique objects that expire after 1 second
      3. Low number of unique objects which are constantly updated
      4. Large number of unique objects which exceed a defined cache size
      5. Large number of unique objects which exceed a defined cache size
         that also expire and go stale rapidly
      6. Large number of unique objects which expire and go stale rapidly
      7. Large number of unique objects
      
      For all of the above there are a large number of threads constantly
      attempting to retrieve random objects and each test runs for a few
      seconds.
      
      ASTERISK-25067
      Reported by: Matt Jordan
      
      Change-Id: I8c8ceff977332c80ed4a31f10d694d48552b2f78
      028edae8
    • Mark Michelson's avatar
    • Matt Jordan's avatar
      269fbff3
    • Joshua Colp's avatar
      res_sorcery_memory_cache: Add test event when a refresh occurs. · 19de2bbc
      Joshua Colp authored
      This change adds a testsuite event for when a refresh occurs.
      This is useful as it provides a guaranteed mechanism of knowing when
      it has occurred instead of waiting an arbitrary amount of time.
      
      ASTERISK-25067
      Reported by: Matt Jordan
      
      Change-Id: Iaa6b8d2d6bab7f99ee08e1c8908b8272a8987e65
      19de2bbc
  3. Jun 03, 2015
    • Mark Michelson's avatar
      res_pjsip: Prevent access of NULL channels. · 92ccffd9
      Mark Michelson authored
      It is possible to receive incoming requests or responses after the channel
      on an ast_sip_session has been destroyed and NULLed out. Handlers of these
      sorts of requests or responses need to be prepared for the possibility
      that the channel is NULL or else they could cause a crash.
      
      While several places have been amended to deal with NULL channels, there
      were still a couple of places that needed updating.
      
      res_pjsip_dtmf_info.c: When handling incoming INFO requests, we need to
      return early if there is no channel on the session.
      
      res_pjsip_session.c: When handling a 302 response, we need to stop the
      redirecting attempt if there is no channel on the session.
      
      ASTERISK-25148 #close
      reported by Mark Michelson
      
      Change-Id: Id1a75ffc3d0eaa168b0b28188fb54d6cf9fc47a9
      92ccffd9
    • George Joseph's avatar
      res_pjsip/location: Fix ref leak in contact_apply_handler · d355ee7f
      George Joseph authored
      contact_apply_handler calls ast_res_pjsip_find_or_create_contact_status
      to force the creation of a contact_status object whenever a new
      contact is added but it didn't unref the returned object.
      
      Added an ao2_cleanup(status) to plug the leak.
      
      ASTERISK-25141
      
      Change-Id: Icc1401cae142855a1abc86ab5179dfb3ee861c40
      Reported-by: Corey Farrell
      d355ee7f
  4. Jun 02, 2015
  5. Jun 01, 2015
  6. May 31, 2015
    • Ivan Poddubny's avatar
      Fix buffer overflow in slin sample frames generation. · 0a5f8c0d
      Ivan Poddubny authored
      The length of frames retured by sample functions was twice as large as
      real, what caused global buffer overflow caught by AddressSanitizer.
      
      ASTERISK-24717 #close
      Reported by: Badalian Vyacheslav
      
      Change-Id: Iec2fe682aef13e556684912f906bedf7c18229c6
      0a5f8c0d
  7. May 29, 2015
  8. May 27, 2015
    • George Joseph's avatar
      endpoint/stasis: Eliminate duplicate events on endpoint status change · 6fca75bb
      George Joseph authored
      
      When an endpoint was created, it's messages were being forwarded to
      both the tech endpoint topic and the all endpoints topic.  Since
      the tech topic was also forwarded to all, this was resulting in
      duplicate messages whenever an endpoint published.  This patch
      causes the endpoint to only forward to the tech topic and lets
      the tech topic forward to all.
      
      To accomplish this, the existing stasis_cp_single_create function
      (which both creates and forwards) was cloned and split into 2
      functions, one that creates the topic and one that sets up the
      forwarding.  This allows endpoint_internal_create to create
      the topic from the endpoint_all cache without forwarding it there,
      then allows it to do the forward to the tech's topic.
      
      ASTERISK-25137 #close
      Reported-by: Vitezslav Novy
      ASTERISK-25116 #close
      Reported-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      Tested-by: default avatarGeorge Joseph <george.joseph@fairview5.com>
      
      Change-Id: I26d7d4926a0861748fd3bdffe316b75b549a801c
      6fca75bb
    • Mark Michelson's avatar
      res_sorcery_memory_cache: Add support for refreshing stale objects. · 2e54e722
      Mark Michelson authored
      This change introduces a check of object_lifetime_stale when retrieving
      cached objects. If the amount of time the object has been in the cache
      exceeds the lifetime, then a task is scheduled to update the cached
      object based on an object retrieved from other sorcery wizards instead.
      
      To prevent the cached object from being retrieved during a refresh,
      thread-local storage is used to mark the thread as being a stale object
      update. This results in the cache returning no object, leading to
      sorcery querying other wizards for the object instead.
      
      A test has been added for stale objects as well. This test ensures that
      stale objects are retrieved the same as freshly-cached objects. The test
      also ensures that after an object is stale, changes in the backend are
      reflected in the cache, to include if the object has been deleted from
      the backend.
      
      ASTERISK-25067
      Reported by Matt Jordan
      
      Change-Id: I9bd7c049adf6939bfe2899f393c2bfbbf412d217
      2e54e722
  9. May 26, 2015
  10. May 25, 2015
    • Ivan Poddubny's avatar
      Astobj2: Correctly treat hash_fn returning INT_MIN · 23a798fe
      Ivan Poddubny authored
      The code in astobj2_hash.c wrongly assumed that abs(int) is always > 0.
      However, abs(INT_MIN) = INT_MIN and is still negative, as well as
      abs(INT_MIN) % num_buckets, and as a result this led to a crash.
      
      One way to trigger the bug is using host=::80 or 0.0.0.128 in peer
      configuration section in chan_sip or chan_iax.
      
      This patch takes the remainder before applying abs, so that bucket
      number is always in range.
      
      ASTERISK-25100 #close
      Reported by: Mark Petersen
      
      Change-Id: Id6981400ad526f47e10bcf7b847b62bd2785e899
      23a798fe
  11. May 24, 2015
  12. May 23, 2015
Loading