Skip to content
Snippets Groups Projects
  1. Dec 21, 2016
  2. Dec 20, 2016
  3. Dec 19, 2016
  4. Dec 18, 2016
    • George Joseph's avatar
      pjproject_bundled: Make build single threaded · d29eb3b9
      George Joseph authored
      There were just too many issues in various environments with
      multi threaded building of pjproject.  It doesn't really speed
      things up anyway since asterisk is already being compiled in
      parallel.
      
      Change-Id: Ie5648fb91bb89b4224b6bf43a0daa1af793c4ce1
      d29eb3b9
  5. Dec 17, 2016
    • Corey Farrell's avatar
      chan_sip: Reorder unload_module to deal with stuck TCP threads. · 8fbb384e
      Corey Farrell authored
      In some situations TCP threads may become frozen.  This creates the
      possibility that Asterisk could segfault if they become unfrozen after
      chan_sip has been dlclose'd.  This reorders the unload_module process to
      allow abort if threads do not exit within 5 seconds.
      
      High level order as follows:
      1) Unregister from the core to stop new requests.
      2) Signal threads to stop
      3) Clear config based tables (but do not free the table itself).
      4) Verify that threads have shutdown, cancel unload if not.
      5) Clean all remaining resources.
      
      ASTERISK-26586
      
      Change-Id: Ie23692041d838fbd35ece61868f4c640960ff882
      8fbb384e
  6. Dec 16, 2016
    • David M. Lee's avatar
      configure: fix with-pjproject-bundled · 147b8e63
      David M. Lee authored
      The AC_ARG_WITH macro's shell variable is withval; not enableval. Purely
      coincidentally, the option would work when --enable-dev-mode is given.
      
      Also fixed a portability problem with bootstrap.sh, since -printf is not
      a portable option for find.
      
      Change-Id: I0f0e5b1a934b5af5737713834361e9c95b96b376
      147b8e63
  7. Dec 15, 2016
  8. Dec 14, 2016
  9. Dec 09, 2016
  10. Dec 08, 2016
    • Badalyan Vyacheslav's avatar
      Fix typo in chan_sip · 4c6ba1db
      Badalyan Vyacheslav authored
      The conditional expressions of the 'if' operators
      situated alongside each other are identical.
      
      Change-Id: I652b6dcddb3be007e669a6aa8107edb31a1ddafb
      4c6ba1db
    • Badalyan Vyacheslav's avatar
      res_pjsip: Fix 'A = B != C' kind. · 934aa2c7
      Badalyan Vyacheslav authored
      Consider reviewing the expression of the 'A = B != C' kind.
      The expression is calculated as following: 'A = (B != C)'
      
      Change-Id: Ibaa637dfda47d51a20e26069d3103e05ce80003d
      934aa2c7
    • Badalyan Vyacheslav's avatar
      chan_sip: Delete unneeded check · 51118e7d
      Badalyan Vyacheslav authored
      P is always true. We check it before
      
      Change-Id: Iee61cda002a9f61aee26b9f66c5f9b59e3389efb
      51118e7d
    • Badalyan Vyacheslav's avatar
      Small code cleanup in chan_sip · fe5be818
      Badalyan Vyacheslav authored
      The conditional expressions of the 'if' operators situated
      alongside each other are identical.
      
      Change-Id: I2cf7c317b106ec14440c7f1b5dcfbf03639f748a
      fe5be818
    • Badalyan Vyacheslav's avatar
      Fix IO conversion bug · 149d8db9
      Badalyan Vyacheslav authored
      Expression 'rlen < 0' is always false.
      Unsigned type value is never < 0.
      
      Change-Id: Id9f393ff25b009a6c4a6e40b95f561a9369e4585
      149d8db9
    • Kevin Harwell's avatar
    • Walter Doekes's avatar
      chan_sip: Do not allow non-SP/HTAB between header key and colon. · c796f00c
      Walter Doekes authored
      RFC says SIP headers look like:
      
          HCOLON  =  *( SP / HTAB ) ":" SWS
          SWS     =  [LWS]                    ; sep whitespace
          LWS     =  [*WSP CRLF] 1*WSP        ; linear whitespace
          WSP     =  SP / HTAB                ; from rfc2234
      
      chan_sip implemented this:
      
          HCOLON  =  *( LOWCTL / SP ) ":" SWS
          LOWCTL  = %x00-1F                   ; CTL without DEL
      
      This discrepancy meant that SIP proxies in front of Asterisk with
      chan_sip could pass on unknown headers with \x00-\x1F in them, which
      would be treated by Asterisk as a different (known) header.  For
      example, the "To\x01:" header would gladly be forwarded by some proxies
      as irrelevant, but chan_sip would treat it as the relevant "To:" header.
      
      Those relying on a SIP proxy to scrub certain headers could mistakenly
      get unexpected and unvalidated data fed to Asterisk.
      
      This change fixes so chan_sip only considers SP/HTAB as valid tokens
      before the colon, making it agree on the headers with other speakers of
      SIP.
      
      ASTERISK-26433 #close
      AST-2016-009
      
      Change-Id: I78086fbc524ac733b8f7f78cb423c91075fd489b
      c796f00c
    • Joshua Colp's avatar
    • Joshua Colp's avatar
      res_format_attr_opus: Fix crash when fmtp contains spaces. · 5c89604a
      Joshua Colp authored
      When an opus offer or answer was received that contained an
      fmtp line with spaces between the attributes the module would
      fail to properly parse it and crash due to recursion.
      
      This change makes the module handle the space properly and
      also removes the recursion requirement.
      
      ASTERISK-26579
      
      Change-Id: I01f53e5d9fa9f1925a7365f8d25071b5b3ac2dc3
      5c89604a
    • George Joseph's avatar
      res_pjsip_registrar: AMI Add RegistrationInboundContactStatuses command · 79b09b5f
      George Joseph authored
      The PJSIPShowRegistrationsInbound AMI command was just dumping out
      all AORs which was pretty useless and resource heavy since it had
      to get all endpoints, then all aors for each endpoint, then all
      contacts for each aor.
      
      PJSIPShowRegistrationInboundContactStatuses sends ContactStatusDetail
      events which meets the intended purpose of the other command and has
      significantly less overhead.  Also, some additional fields that were
      added to Contact since the original creation of the ContactStatusDetail
      event have been added to the end of the event.
      
      For compatibility purposes, PJSIPShowRegistrationsInbound is left
      intact.
      
      ASTERISK-26644 #close
      
      Change-Id: I326f12c9ecb52bf37ba03f0748749de4da01490a
      79b09b5f
  11. Dec 07, 2016
    • snuffy's avatar
      tests_dns: Make DNS tests older nameser.h compatible · 3b6e6cd0
      snuffy authored
      Fix the tests for DNS to use older style nameser.h as
      in ASTERISK-26608.
      
      Tested on: OpenBSD 6.0, Debian 8
      
      ASTERISK-26647 #close
      
      Change-Id: I285913c44202537c04b3ed09c015efa6e5f9052d
      3b6e6cd0
    • Joshua Colp's avatar
    • Joshua Colp's avatar
      18fe80e7
    • Joshua Colp's avatar
      119c41d0
    • Richard Mudgett's avatar
      Bundled pjproject: Fix finding SIP transactions. · 76d52dc2
      Richard Mudgett authored
      Occasionally SIP message transactions are not found when they should be.
      In the particular case an incoming INVITE transaction is CANCELed but the
      INVITE transaction cannot be found so a 481 response is returned for the
      CANCEL.  The problematic calls have a '_' character in the Via branch
      parameter.
      
      The problem is in the pjproject PJ_HASH_USE_OWN_TOLOWER feature's code.
      The problem with the "own tolower" code is that it does not calculate the
      same hash value as when the pj_tolower() function is used.  The "own
      tolower" code will erroneously modify the ASCII characters '@', '[', '\\',
      ']', '^', and '_'.  Calls to pj_hash_calc_tolower() can use the
      PJ_HASH_USE_OWN_TOLOWER substitute algorithm when enabled.  Calls to
      pj_hash_get_lower(), pj_hash_set_lower(), and pj_hash_set_np_lower() call
      find_entry() which never uses the PJ_HASH_USE_OWN_TOLOWER algorithm.  As a
      result you may not be able to find a hash tabled entry because the
      calculated hash values would differ.
      
      * Simply disable PJ_HASH_USE_OWN_TOLOWER.
      
      ASTERISK-26490 #close
      
      Change-Id: If89bfdb5f301b8b685881a9a2a6e0c3c5af32253
      76d52dc2
    • Mark Michelson's avatar
      http: Send headers and body in one write. · 50300612
      Mark Michelson authored
      This is a semi-regression caused by the iostreams change. Prior to
      iostreams, HTTP headers were written to a FILE handle using fprintf.
      Then the body was written using a call to fwrite(). Because of internal
      buffering, the result was that the HTTP headers and body would be sent
      out in a single write to the socket.
      
      With the change to iostreams, the HTTP headers are written using
      ast_iostream_printf(), which under the hood calls write(). The HTTP body
      calls ast_iostream_write(), which also calls write() under the hood.
      This results in two separate writes to the socket.
      
      Most HTTP client libraries out there will handle this change just fine.
      However, a few of our testsuite tests started failing because of the
      change. As a result, in order to reduce frustration for users, this
      change alters the HTTP code to write the headers and body in a single
      write operation.
      
      ASTERISK-26629 #close
      Reported by Joshua Colp
      
      Change-Id: Idc2d2fb3d9b3db14b8631a1e302244fa18b0e518
      50300612
  12. Dec 06, 2016
    • Mark Michelson's avatar
      Iostreams: Correct off-by-one error. · bf6423a3
      Mark Michelson authored
      ast_iostream_printf() attempts first to use a fixed-size buffer to
      perform its printf-like operation. If the fixed-size buffer is too
      small, then a heap allocation is used instead. The heap allocation in
      this case was exactly the length of the string to print. The issue here
      is that the ensuing call to vsnprintf() will print a NULL byte in the
      final space of the string. This meant that the final character was being
      chopped off the string and replaced with a NULL byte. For HTTP in
      particular, this caused problems because HTTP publishes the expected
      Contact-Length. This meant HTTP was publishing a length one character
      larger than what was actually present in the message.
      
      This patch corrects the issue by adding one to the allocation length.
      
      ASTERISK-26629
      Reported by Joshua Colp
      
      Change-Id: Ib3c5f41e96833d0415cf000656ac368168add639
      bf6423a3
Loading