Skip to content
Snippets Groups Projects
  1. Dec 11, 2017
  2. Dec 08, 2017
  3. Dec 07, 2017
  4. Dec 06, 2017
    • Corey Farrell's avatar
      sounds_index: Avoid repeatedly reindexing. · ab191e97
      Corey Farrell authored
      The sounds index is rebuilt each time a format is registered or
      unregistered.  This causes the index to be repeatedly rebuilt during
      startup and shutdown.
      
      This patch significantly reduces the work done by delaying sound index
      initialization until after modules are loaded.  This way a reindex only
      occurs if a format module is loaded after startup.  We also skip
      reindexing when format modules are unloaded during shutdown.
      
      Change-Id: I585fd6ee04200612ab1490dc804f76805f89cf0a
      ab191e97
    • Richard Mudgett's avatar
      CDR: Fix deadlock setting some CDR values. · 3078b7ad
      Richard Mudgett authored
      Setting channel variables with the AMI Originate action caused a deadlock
      when you set CDR(amaflags) or CDR(accountcode).  This path has the channel
      locked when the CDR function is called.  The CDR function then
      synchronously passes the job to a stasis thread.  The stasis handling
      function then attempts to lock the channel.  Deadlock results.
      
      * Avoid deadlock by making the CDR function handle setting amaflags and
      accountcode directly on the channel rather than passing it off to the CDR
      processing code under a stasis thread to do it.
      
      * Made the CHANNEL function and the CDR function process amaflags the same
      way.
      
      * Fixed referencing the wrong message type in cdr_prop_write().
      
      ASTERISK-27460
      
      Change-Id: I5eacb47586bc0b8f8ff76a19bd92d1dc38b75e8f
      3078b7ad
    • Corey Farrell's avatar
      media_index: Improve startup. · 2af59ebb
      Corey Farrell authored
      This eliminates some wasteful operations in media_index startup.
      
      * Replace statically set string-fields with char[0].
      * Eliminate pointless RAII_VAR's.
      * alloc_variant: Avoid pointless ao2_find on new info->variant.
      * Stop trying find_variant before alloc_variant.
      * process_media_file: replace ast_str with ast_asprintf.  This avoids
        reallocation of file_id_str.
      
      Overall sounds_index.c is about 27% of Asterisk startup time when using
      sample configs.  This patch reduces it to 20%.  This is a half-fix.  The
      real problem is that the media_index is regenerated repeatedly - 68
      times in my test.
      
      Change-Id: Ia50b752f8efb356f852b05c4be495a6631af8652
      2af59ebb
    • Richard Mudgett's avatar
      bridge_basic.c: Update transfer diagnostic messages addendum. · e97e4155
      Richard Mudgett authored
      * Added start DTMF transfer verbose messages.
      * Made associated transfer messages use a similar message format.
      * Adjusted message verbose level as requested by initial reporter.
      
      ASTERISK-27449
      
      Change-Id: I2045714586414b3c5ef1f3cc56c1c4af4b31f551
      e97e4155
    • Jenkins2's avatar
    • Jenkins2's avatar
      Merge "Add new object for VoicemailUserEntry" · f761206f
      Jenkins2 authored
      f761206f
    • Joshua Colp's avatar
    • Jenkins2's avatar
      cc81f4eb
  5. Dec 05, 2017
    • Niklas Larsson's avatar
      bridge_basic.c: Update transfer diagnostic messages. · 9d005831
      Niklas Larsson authored
      * Add the channel name to diagnostic messages so you will know which
      channel failed to transfer.
      
      * Promoted some debug messages to verbose 4 messages.
      
      ASTERISK-27449 #close
      
      Change-Id: Idac66b7628c99379cc9269158377fd87dc97a880
      9d005831
  6. Dec 04, 2017
  7. Dec 02, 2017
    • Corey Farrell's avatar
      autoconf: Remove use of m4_ifblank. · 39939cec
      Corey Farrell authored
      The m4_ifblank macro is not available on CentOS 6, reverse conditionals
      to allow use of m4_ifval instead.  ./bootstrap.sh was run but this patch
      does not result in any difference to the generated configure script.
      
      Change-Id: I280785deb872ed8d3339d99cce63a2b54d5f1438
      39939cec
  8. Dec 01, 2017
    • George Joseph's avatar
      AST-2017-013: chan_skinny: Call pthread_detach when sess threads end · 075faac2
      George Joseph authored
      chan_skinny creates a new thread for each new session.  In trying
      to be a good cleanup citizen, the threads are joinable and the
      unload_module function does a pthread_cancel() and a pthread_join()
      on any sessions that are active at that time.  This has an
      unintended side effect though. Since you can call pthread_join on a
      thread that's already terminated, pthreads keeps the thread's
      storage around until you explicitly call pthread_join (or
      pthread_detach()).   Since only the module_unload function was
      calling pthread_join, and even then only on the ones active at the
      tme, the storage for every thread/session ever created sticks
      around until asterisk exits.
      
      * A thread can detach itself so the session_destroy() function
        now calls pthread_detach() just before it frees the session
        memory allocation.  The module_unload function still takes care
        of the ones that are still active should the module be unloaded.
      
      ASTERISK-27452
      Reported by: Juan Sacco
      
      Change-Id: I9af7268eba14bf76960566f891320f97b974e6dd
      (cherry picked from commit 8f5dff54)
      075faac2
    • Sean Bright's avatar
      config: Speed up config template lookup · d9fdeae6
      Sean Bright authored
      ast_category_get() has an (undocumented) implementation detail where it
      tries to match the category name first by an explicit pointer comparison
      and if that fails falls back to a normal match.
      
      When initially building an ast_config during ast_config_load, this
      pointer comparison can never succeed, but we will end up iterating all
      categories twice. As the number of categories using a template
      increases, this dual looping becomes quite expensive. So we pass a flag
      to category_get_sep() indicating if a pointer match is even possible
      before trying to do so, saving us a full pass over the list of current
      categories.
      
      In my tests, loading a file with 3 template categories and 12000
      additional categories that use those 3 templates (this file configures
      4000 PJSIP endpoints with AOR & Auth) takes 1.2 seconds. After this
      change, that drops to 22ms.
      
      Change-Id: I59b95f288e11eb6bb34f31ce4cc772136b275e4a
      d9fdeae6
    • Sean Bright's avatar
      config: Speed up ACO & sorcery initialization · 1ad0fbc8
      Sean Bright authored
      When starting Asterisk in the foreground, there is a perceptible delay
      when loading modules that use the ACO and sorcery config frameworks.
      For example, a lightly configured res_pjsip took 853ms to load on my
      VM.
      
      I tracked down the slowness to the XPath queries used to associate the
      relevant documentation with the config options. One improvement was
      adding a call to xmlXPathOrderDocElems after loading an XML document.
      From the libxml2 docs:
      
        Call this routine to speed up XPath computation on static documents.
      
      The second change was to remove recursive descent and wildcard
      operators from the XPath queries. After these changes, res_pjsip takes
      85ms to load on my VM and there is no longer a perceptible delay when
      starting Asterisk in the foreground.
      
      Change-Id: I45d457f1580e26bf5a2b0dab16e8e9ae46dcbd82
      1ad0fbc8
    • Joshua Colp's avatar
      res_http_post: Not all versions of gmime have GMIME_MAJOR_VERSION. · 892df22c
      Joshua Colp authored
      This change makes the presence of the GMIME_MAJOR_VERSION
      definition optional, as not all versions of gmime actually
      define it.
      
      ASTERISK-27454
      
      Change-Id: I01d99590045971ed6787899147170a5954077238
      892df22c
    • Corey Farrell's avatar
      README-SERIOUSLY.bestpractices.txt: Convert to markdown · 35a7036a
      Corey Farrell authored
      Follow-up to conversion of README.md.
      
      Change-Id: I17ee7cf25bc027ece844efa2c1dfe613aff1e35b
      35a7036a
  9. Nov 30, 2017
  10. Nov 28, 2017
  11. Nov 27, 2017
Loading