Skip to content
Snippets Groups Projects
  1. May 07, 2015
    • George Joseph's avatar
      vector: Additional enhancements and fixes · c886be5d
      George Joseph authored
      After using the new vector stuff for real I found...
      
      A bug in AST_VECTOR_INSERT_AT that could cause a seg fault.
      
      The callbacks needed to be closer to ao2_callback in behavior
      WRT to CMP_MATCH and CMP_STOP behavior and the ability to return
      a vector of matched entries.
      
      A pre-existing issue with APPEND and REPLACE was also fixed.
      
      I also added a new macro to test.h that acts like ast_test_validate
      but also accepts a return code variable and a cleanup label.  As well
      as printing the error, it sets the rc variable to AST_TEST_FAIL and
      does a goto to the specified label on error.  I had a local version
      of this in test_vector so I just moved it.
      
      ASTERISK-25045
      
      Change-Id: I05e5e47fd02f61964be13b7e8942bab5d61b29cc
      c886be5d
  2. May 06, 2015
  3. May 05, 2015
    • Ivan Poddubny's avatar
      app_queue: Fix queue_log EXITWITHTIMEOUT containing only 1 parameter · 90bfc02e
      Ivan Poddubny authored
      This patch fixes EXITWITHTIMEOUT queue_log entry to always come with 3
      parameters: position, original position and waiting time.
      
      ASTERISK-25038 #close
      Reported by: Etienne Lessard
      
      Change-Id: I0c62045922e26bee2125e93aee1dee17eee79618
      90bfc02e
    • Joshua Colp's avatar
      chan_unistim: Fix build failure due to ACL changes. · bebf0b9b
      Joshua Colp authored
      Change-Id: I57081045c72b9fcf12d5c84493278f9272c31b32
      bebf0b9b
    • Matt Jordan's avatar
      bc8dcbdf
    • Matt Jordan's avatar
    • Joshua Colp's avatar
    • Corey Farrell's avatar
      res_ari_bridges: Add missing dependencies. · c541923a
      Corey Farrell authored
      Missed this module in the previous commit.  res_ari_bridges uses symbols
      from res_stasis_playback and res_stasis_recording.
      
      ASTERISK-25027 #close
      Reported by: Corey Farrell
      
      Change-Id: I90bf756abd25adfc4920d2869ebe7feb636b8c5f
      c541923a
    • Corey Farrell's avatar
      pbx_config: Register manager actions with module version of macro. · 8a3e93a3
      Corey Farrell authored
      Switch manager actions in pbx_config to use the registration macro that
      passes the module pointer, allowing pbx_config reference to be bumped
      while the manager actions run.
      
      ASTERISK-25061 #close
      Reported by: Corey Farrell
      
      Change-Id: I422c50dd74814616ac10c5e9c6598a0b1bc2c44e
      8a3e93a3
    • Joshua Colp's avatar
      stasis: Fix dial masquerade datastore lifetime · 11f650c6
      Joshua Colp authored
      A recent change went into Asterisk which added reference counts to the
      channels stored in a dial masquerade datastore. Unfortunately this
      included a reference to the caller in a dialing operation. While all
      of the dialed targets have the datastore removed from them upon dialing
      completion this did not occur for the caller, causing it to have a
      reference to itself that could go never go away (as it depended on
      the destruction of the datastore which only happened when the channel
      was destroyed). This resulted in the caller channel remaining on the
      system despite it having hung up.
      
      This change does the following to fix this issue:
      
      1. The dial masquerade datastore is now removed from the caller upon
      dialing completion, just like the dialed targets.
      2. Upon destruction of the caller all the dialed targets are also
      removed from the dial masquerade datastore (just in case).
      3. The reference to the caller has been removed as it should not be
      possible for the datastore to now be valid/useful after the lifetime
      of the caller has ended.
      
      ASTERISK-25025 #close
      
      Change-Id: I1ef4ca5ca04980028604cc2af5d2992ac3431b3f
      11f650c6
    • George Joseph's avatar
      vector: Traversal, retrieval, insert and locking enhancements · 6d594129
      George Joseph authored
      Renamed AST_VECTOR_INSERT to AST_VECTOR_REPLACE because it really
      does replace not insert.  The few users of AST_VECTOR_INSERT were
      refactored.  Because these are macros, there should be no ABI
      compatibility issues.
      
      Added AST_VECTOR_INSERT_AT that actually inserts an element into the
      vector at a specific index pushing existing elements to the right.
      
      Added AST_VECTOR_GET_CMP that can retrieve from the vector based
      on a user-provided compare function.
      
      Added AST_VECTOR_CALLBACK function that will execute a function
      for each element in the vector.  Similar to ao2_callback and
      ao2_callback_data functions although the vector callback can take
      a variable number of arguments.  This should allow easy migration
      to a vector where a container might be too heavy.
      
      Added read/write locked vector and lock manipulation macros.
      
      Added unit tests.
      
      ASTERISK-25045 #close
      
      Change-Id: I2e07ecc709d2f5f91bcab8904e5e9340609b00e0
      6d594129
  4. May 04, 2015
  5. May 03, 2015
    • Corey Farrell's avatar
      main/presencestate.c: Add trailing slash to test category. · 1368dae7
      Corey Farrell authored
      ASTERISK-25053
      Reported by: Corey Farrell
      
      Change-Id: I8c0375dd0818747b2d2e1ceaea87bfbeb2daf8d4
      1368dae7
    • Joshua Colp's avatar
    • Matt Jordan's avatar
    • Diederik de Groot's avatar
      Update configure.ac/Makefile for clang · 305ce3de
      Diederik de Groot authored
      Created autoconf/ast_check_raii.m4: contains AST_CHECK_RAII which
      checks compiler requirements for RAII:
      gcc: -fnested-functions support
      clang: -fblocks (and if required -lBlocksRuntime)
      The original check was implemented in configure.ac and now has it's
      own file. This function also sets C_COMPILER_FAMILY to either gcc or
      clang for use by makefile
      
      Created autoconf/ast_check_strsep_array_bounds.m4 (contains
      AST_CHECK_STRSEP_ARRAY_BOUNDS):
      which checks if clang is able to handle the optimized strsep & strcmp
      functions (linux). If not, the standard libc implementation should be
      used instead. Clang + the optimized macro's work with:
      strsep(char *, char []), but not with strsepo(char *, char *).
      Instead of replacing all the occurences throughout the source code,
      not using the optimized macro version seemed easier
      
      See 'define __strcmp_gc(s1, s2, l2) in bits/string2.h':
      llvm-comment: Normally, this array-bounds warning are suppressed for
      macros, so that unused paths like the one that accesses __s1[3] are
      not warned about.  But if you preprocess manually, and feed the
      result to another instance of clang, it will warn about all the
      possible forks of this particular if statement. Instead of switching
      of this optimization, another solution would be to run the preproces-
      sing step with -frewrite-includes, which should preserve enough
      information so that clang should still be able to suppress the diag-
      nostic at the compile step later on.
      
      See also "https://llvm.org/bugs/show_bug.cgi?id=20144"
      See also "https://llvm.org/bugs/show_bug.cgi?id=11536"
      
      Makefile.rules: If C_COMPILER_FAMILY=clang then add two warning
      suppressions:
      -Wno-unused-value
      -Wno-parentheses-equality
      In an earlier review (reviewboard: 4550 and 4554), they were deemed a
      nuisace and less than benefitial.
      
      configure.ac:
      Added AST_CHECK_RAII() see earlier
      Added AST_CHECK_STRSEP_ARRAY_BOUNDS() see earlier
      Removed moved content
      
      ASTERISK-24917
      Change-Id: I12ea29d3bda2254ad3908e279b7effbbac6a97cb
      305ce3de
    • Rodrigo Ramírez Norambuena's avatar
      cdr/cdr_csv.c: Add a new option to enable columns added in Asterisk 1.8 · 8886b724
      Rodrigo Ramírez Norambuena authored
      This patch adds a new option to cdr.conf, 'newcdrcolumns', that will handle CDR
      columns added in Asterisk 1.8. The columns are:
       * peeraccount
       * linkedid
       * sequence
      When enabled, the columns in the database entry will be populated with the data
      from the CDR.
      
      ASTERISK-24976 #close
      
      Change-Id: I51a57063f4ae5e194a9d933a8df45dc8a4534f0b
      8886b724
    • Matt Jordan's avatar
      8e1b7472
    • Corey Farrell's avatar
      Remove unneeded uses of optional_api providers. · c3ec5da1
      Corey Farrell authored
      A few cases exist where headers of optional_api provders are included but
      not needed.  This causes unneeded calls to ast_optional_api_use.
      
      * Don't include optional_api.h from sip_api.h.
      * Move 'struct ast_channel_monitor' to channel.h.
      * Don't include monitor.h from chan_sip.c, channel.c or features.c.
      
      The move of struct ast_channel_monitor is needed since channel.c depends on
      it.  This has no effect on users of monitor.h since channel.h is included
      from monitor.h.
      
      ASTERISK-25051 #close
      Reported by: Corey Farrell
      
      Change-Id: I53ea65a9fc9693c89f8bcfd6120649bfcfbc3478
      c3ec5da1
  6. May 02, 2015
    • Matt Jordan's avatar
      2be86117
    • Matt Jordan's avatar
    • Corey Farrell's avatar
      res_pjsip_dlg_options: Fix MODULEINFO section. · 44bbdbe3
      Corey Farrell authored
      Removed the extra space before "MODULEINFO" in res_pjsip_dlg_options.
      This extra space prevented any of the dependencies from being seen by
      menuselect, so building with default options would fail if PJSIP was
      not installed.
      
      This also makes the tool that extracts information for menuselect
      tolerant of multiple spaces in the future.
      
      ASTERISK-25033 #close
      Reported by: Peter Whisker
      
      Change-Id: Iccd54846f70c4a7a50cb5bf70b7bb5cb4bab3698
      44bbdbe3
    • D Tucny's avatar
      term: send proper reset sequence when black background is forced · e4f0a55f
      D Tucny authored
      When using the force black background command-line option or configuration
      option an invalid reset sequence is sent following a coloured output item 
      in the CLI, the result is that the colour is not 'turned off' and continues
      until the next non-default coloured text output.
      
      A reset sequence is already defined in term.c, but the ast_term_reset
      function doesn't use it, instead building it's own invalid sequence and 
      returning that.
      
      This patch changes that behaviour, removing the building of a reset sequence
      and instead using the pre-built constant 'enddata' which is a suitable reset
      sequence for this purpose.
      
      ASTERISK-24896 #close
      Reported by: Dan Tucny
      
      Change-Id: I56323899123ae3264900389cae1f5b252aa3bf43
      e4f0a55f
  7. May 01, 2015
    • Corey Farrell's avatar
      Astobj2: Fix initialization order of refdebug and AO2_DEBUG. · 8f3cee12
      Corey Farrell authored
      This ensures that refdebug is initialized before AO2_DEBUG if
      both are enabled, since AO2_DEBUG allocates a container.
      
      This change also makes AO2_DEBUG initialization critical, a
      failure will abort Asterisk startup.  This is needed since
      the failure would be caused by reg_containers allocation
      failure, and that would result in a segmentation fault by
      ao2_container_register later in startup.
      
      ASTERISK-25048 #close
      Reported by: Corey Farrell
      
      Change-Id: I9a243ea3fc5653b48b931ba6d61971cb2e530244
      8f3cee12
    • Matt Jordan's avatar
      main/pbx: Improve performance of dialplan reloads with a large number of hints · 7ac28be0
      Matt Jordan authored
      The PBX core maintains two hash tables for hints: a container of the
      actual hints (hints), along with a container of devices that are watching that
      hint (hintdevices). When a dialplan reload occurs, each hint in the hints
      container is destroyed; this requires a lookup in the container of devices to
      find the device => hint mapping object. In the current code, this performs an
      ao2_callback, iterating over each of the device to hint objects in the
      hintdevices container. For a large number of hints, this is extremely
      expensive: dialplan reloads with 20000 hints could take several minutes
      in just this phase.
      
      This patch improves the performance of this step in the dialplan reloads
      by caching which devices are watching a hint on the hint object itself.
      Since we don't want to create a circular reference, we just cache the
      name of the device. This allows us to perform a smarter ao2_callback on
      the hintdevices container during hint removal, hashing on the name of the
      device and returning an iterator to the matching names. The overall
      performance improvement is rather large, taking this step down to a number of
      seconds as opposed to minutes.
      
      In addition, this patch also registers the hint containers in the PBX
      core with the astobj2 library. This allows for reasonable debugging to
      hash collisions in those containers.
      
      ASTERISK-25040 #close
      Reported by: Matt Jordan
      
      Change-Id: Iedfc97a69d21070c50fca42275d7b3e714e59360
      7ac28be0
    • Matt Jordan's avatar
      01f3d5b7
  8. Apr 30, 2015
Loading