Skip to content
Snippets Groups Projects
  1. May 09, 2022
    • George Joseph's avatar
      GCC12: Fixes for 16+ · 4aa54168
      George Joseph authored
      Most issues were in stringfields and had to do with comparing
      a pointer to an constant/interned string with NULL.  Since the
      string was a constant, a pointer to it could never be NULL so
      the comparison was always "true".  gcc now complains about that.
      
      There were also a few issues where determining if there was
      enough space for a memcpy or s(n)printf which were fixed
      by defining some of the involved variables as "volatile".
      
      There were also a few other miscellaneous fixes.
      
      ASTERISK-30044
      
      Change-Id: Ia081ca1bcfb329df6487c4660aaf1944309eb570
      4aa54168
  2. Mar 14, 2022
  3. Nov 15, 2021
    • Josh Soref's avatar
      res: Spelling fixes · 9ae9893c
      Josh Soref authored
      Correct typos of the following word families:
      
      identifying
      structures
      actcount
      initializer
      attributes
      statement
      enough
      locking
      declaration
      userevent
      provides
      unregister
      session
      execute
      searches
      verification
      suppressed
      prepared
      passwords
      recipients
      event
      because
      brief
      unidentified
      redundancy
      character
      the
      module
      reload
      operation
      backslashes
      accurate
      incorrect
      collision
      initializing
      instance
      interpreted
      buddies
      omitted
      manually
      requires
      queries
      generator
      scheduler
      configuration has
      owner
      resource
      performed
      masquerade
      apparently
      routable
      
      ASTERISK-29714
      
      Change-Id: I88485116d2c59b776aa2e1f8b4ce8239a21decda
      9ae9893c
  4. Feb 25, 2021
  5. Oct 14, 2019
    • Christoph Moench-Tegeder's avatar
      cdr_pgsql cel_pgsql res_config_pgsql: compatibility with PostgreSQL 12 · 52ade184
      Christoph Moench-Tegeder authored
      PostgreSQL 12 finally removed column adsrc from table pg_catalog.pg_attrdef
      (column default values), which has been deprecated since version 8.0.
      Since then, the official/correct/supported way to retrieve the column
      default value from the catalog is function pg_catalog.pg_get_expr().
      
      This change breaks compatibility with pre-8.0 PostgreSQL servers,
      but has reached end-of-support more than a decade ago.
      cdr_pgsql and res_config_pgsql still have support for pre-7.3
      servers, but cleaning that up is perhaps a topic for a major release,
      not this bugfix.
      
      ASTERISK-28571
      
      Change-Id: I834cb3addf1937e19e87ede140bdd16cea531ebe
      52ade184
  6. Mar 14, 2018
    • Corey Farrell's avatar
      loader: Convert reload_classes to built-in modules. · 572a508e
      Corey Farrell authored
      * acl (named_acl.c)
      * cdr
      * cel
      * ccss
      * dnsmgr
      * dsp
      * enum
      * extconfig (config.c)
      * features
      * http
      * indications
      * logger
      * manager
      * plc
      * sounds
      * udptl
      
      These modules are now loaded at appropriate time by the module loader.
      Unlike loadable modules these use AST_MODULE_LOAD_FAILURE on error so
      the module loader will abort startup on failure of these modules.
      
      Some of these modules are still initialized or shutdown from outside the
      module loader.  logger.c is initialized very early and shutdown very
      late, manager.c is initialized by the module loader but is shutdown by
      the Asterisk core (too much uses it without holding references).
      
      Change-Id: I371a9a45064f20026c492623ea8062d02a1ab97f
      572a508e
  7. Mar 07, 2018
  8. Jan 12, 2018
  9. Sep 21, 2017
    • Rodrigo Ramírez Norambuena's avatar
      res_config_pgsql: Fix removed support to previous for versions PostgreSQL 9.1 · cad68137
      Rodrigo Ramírez Norambuena authored
      In PostgreSQL 9.1 the backslash are string literals and not the escape
      of characters.
      
      In previous issue ASTERISK_26057 was fixed the use of escape LIKE but the
      support for old version of Postgresql than 9.1 was dropped. The sentence
      before make was "ESCAPE '\'" but in version before than 9.1  need it to be
      as follow "ESCAPE '\\'".
      
      ASTERISK-27283
      
      Change-Id: I96d9ee1ed7693ab17503cb36a9cd72847165f949
      cad68137
  10. Sep 19, 2017
  11. Aug 01, 2017
    • Corey Farrell's avatar
      Fix compiler warnings on Fedora 26 / GCC 7. · 58d03211
      Corey Farrell authored
      GCC 7 has added capability to produce warnings, this fixes most of those
      warnings.  The specific warnings are disabled in a few places:
      
      * app_voicemail.c: truncation of paths more than 4096 chars in many places.
      * chan_mgcp.c: callid truncated to 80 chars.
      * cdr.c: two userfields are combined to cdr copy, fix would break ABI.
      * tcptls.c: ignore use of deprecated method SSLv3_client_method().
      
      ASTERISK-27156 #close
      
      Change-Id: I65f280e7d3cfad279d16f41823a4d6fddcbc4c88
      58d03211
  12. Mar 01, 2017
  13. Feb 28, 2017
  14. Feb 23, 2017
    • Sean Bright's avatar
      res_config_pgsql: Fix thread safety problems · 0f4b349d
      Sean Bright authored
      * A missing AST_LIST_UNLOCK() in find_table()
      
      * The ESCAPE_STRING() macro uses pgsqlConn under the hood and we were
        not consistently locking before calling it.
      
      * There were a handful of other places where pgsqlConn was accessed
        directly without appropriate locking.
      
      Change-Id: Iea63f0728f76985a01e95b9912c3c5c6065836ed
      0f4b349d
  15. Feb 21, 2017
    • Sean Bright's avatar
      realtime: Centralize some common realtime backend code · 6e6c96d7
      Sean Bright authored
      All of the realtime backends create artificial ast_categorys to pass
      back into the core as query results. These categories have no filename
      or line number information associated with them and the backends differ
      slightly on how they create them. So create a couple helper macros to
      help make things more consistent.
      
      Also updated the call sites to remove redundant error messages about
      memory allocation failure.
      
      Note that res_config_ldap sets the category filename to the 'table name'
      but that is not read by anything in the core, so I've dropped it.
      
      Change-Id: I3a1fd91e0c807dea1ce3b643b0a6fe5be9002897
      6e6c96d7
  16. Feb 16, 2017
    • Sean Bright's avatar
      realtime: Fix LIKE escaping in SQL backends · e93f2a51
      Sean Bright authored
      The realtime framework allows for components to look up values using a
      LIKE clause with similar syntax to SQL's. pbx_realtime uses this
      functionality to search for pattern matching extensions that start with
      an underscore (_).
      
      When passing an underscore to SQL's LIKE clause, it will be interpreted
      as a wildcard matching a single character and therefore needs to be
      escaped. It is (for better or for worse) the responsibility of the
      component that is querying realtime to escape it with a backslash before
      passing it in. Some RDBMs support escape characters by default, but the
      SQL92 standard explicitly says that there are no escape characters
      unless they are specified with an ESCAPE clause, e.g.
      
      	SELECT * FROM table WHERE column LIKE '\_%' ESCAPE '\'
      
      This patch instructs 3 backends - res_config_mysql, res_config_pgsql,
      and res_config_sqlite3 - to use the ESCAPE clause where appropriate.
      
      Looking through documentation and source tarballs, I was able to
      determine that the ESCAPE clause is supported in:
      
      MySQL 5.0.15   (released 2005-10-22 - earliest version available from
                      archives)
      PostgreSQL 7.1 (released 2001-04-13)
      SQLite 3.1.0   (released 2005-01-21)
      
      The versions of the relevant libraries that we depend on to access MySQL
      and PostgreSQL will not work on versions that old, and I've added an
      explicit check in res_config_sqlite3 to only use the ESCAPE clause when
      we have a sufficiently new version of SQLite3.
      
      res_config_odbc already handles the escape characters appropriately, so
      no changes were required there.
      
      ASTERISK-15858 #close
      Reported by: Humberto Figuera
      
      ASTERISK-26057 #close
      Reported by: Stepan
      
      Change-Id: I93117fbb874189ae819f4a31222df7c82cd20efa
      e93f2a51
  17. Oct 27, 2016
    • Corey Farrell's avatar
      Remove ASTERISK_REGISTER_FILE. · a6e5bae3
      Corey Farrell authored
      ASTERISK_REGISTER_FILE no longer has any purpose so this commit removes
      all traces of it.
      
      Previously exported symbols removed:
      * __ast_register_file
      * __ast_unregister_file
      * ast_complete_source_filename
      
      This also removes the mtx_prof static variable that was declared when
      MTX_PROFILE was enabled.  This variable was only used in lock.c so it
      is now initialized in that file only.
      
      ASTERISK-26480 #close
      
      Change-Id: I1074af07d71f9e159c48ef36631aa432c86f9966
      a6e5bae3
  18. Mar 07, 2016
    • Rodrigo Ramírez Norambuena's avatar
      main/cli.c: Refactor function to print seconds formatted · 0ec9fe54
      Rodrigo Ramírez Norambuena authored
      Refactor and created function ast_cli_print_timestr_fromseconds to print
      seconds formatted:  year(s) week(s) day(s) hour(s) second(s)
      
      This function now is used in addons/cdr_mysql.c,cdr_pgsql.c, main/cli.c,
      res_config_ldap.c, res_config_pgsql.c.
      
      Change-Id: Ibeb8634102cd11d3f8623398b279cb731bcde36c
      0ec9fe54
  19. Feb 10, 2016
  20. Feb 07, 2016
  21. Oct 14, 2015
    • Richard Mudgett's avatar
      res_config_pgsql.c: Fix deadlock loading realtime configuration. · d799bcf3
      Richard Mudgett authored
      On v13, loading several thousand PJSIP endpoints on Asterisk start causes
      a deadlock most of the time.
      
      Thanks to mdu113 for discovering that there was a call to pgsql_exec() not
      protected by the pgsql_lock reentrancy lock.
      
      {quote}
      I believe a code path exists that attempts to use pgsql connection without
      locking pgsql_lock.  I believe what happens during that deadlock that I
      see is two concurrent threads are both attempting to send query to pgsql,
      one of the thread is using a code path without locking pgsql_lock.  If
      they managed to send queries at the same time, it seems postgres ignores
      one of the queries and replies only to the one of them.  If it happens so
      that the thread holding the lock didn't receive the reply it will wait for
      it (and hold the lock) forever (or at least for very long time), thus
      completely blocking all access to db.
      {quote}
      
      * Added missing reentrancy locking around pgsql_exec() in find_table().
      
      * Moved unlock of pgsql_lock in unload_module() to avoid locking inversion
      between the psql_tables list lock and the pgsql_lock.
      
      ASTERISK-25455 #close
      Reported by:  mdu113
      Patches:
            res_config_pgsql.c-connlock2.diff (license #5543) patch uploaded by mdu113
      
      Change-Id: Id9e7cdf8a3b65ff19964b0cf942ace567938c4e2
      d799bcf3
  22. May 26, 2015
  23. May 13, 2015
  24. Apr 13, 2015
    • Matt Jordan's avatar
      git migration: Refactor the ASTERISK_FILE_VERSION macro · 4a582616
      Matt Jordan authored
      Git does not support the ability to replace a token with a version
      string during check-in. While it does have support for replacing a
      token on clone, this is somewhat sub-optimal: the token is replaced
      with the object hash, which is not particularly easy for human
      consumption. What's more, in practice, the source file version was often
      not terribly useful. Generally, when triaging bugs, the overall version
      of Asterisk is far more useful than an individual SVN version of a file. As a
      result, this patch removes Asterisk's support for showing source file
      versions.
      
      Specifically, it does the following:
      
      * Rename ASTERISK_FILE_VERSION macro to ASTERISK_REGISTER_FILE, and
        remove passing the version in with the macro. Other facilities
        than 'core show file version' make use of the file names, such as
        setting a debug level only on a specific file. As such, the act of
        registering source files with the Asterisk core still has use. The
        macro rename now reflects the new macro purpose.
      
      * main/asterisk:
        - Refactor the file_version structure to reflect that it no longer
          tracks a version field.
        - Remove the "core show file version" CLI command. Without the file
          version, it is no longer useful.
        - Remove the ast_file_version_find function. The file version is no
          longer tracked.
        - Rename ast_register_file_version/ast_unregister_file_version to
          ast_register_file/ast_unregister_file, respectively.
      
      * main/manager: Remove value from the Version key of the ModuleCheck
        Action. The actual key itself has not been removed, as doing so would
        absolutely constitute a backwards incompatible change. However, since
        the file version is no longer tracked, there is no need to attempt to
        include it in the Version key.
      
      * UPGRADE: Add notes for:
        - Modification to the ModuleCheck AMI Action
        - Removal of the "core show file version" CLI command
      
      Change-Id: I6cf0ff280e1668bf4957dc21f32a5ff43444a40e
      4a582616
  25. Jul 25, 2014
  26. Jul 16, 2014
  27. May 28, 2014
    • Matthew Jordan's avatar
      Logger/CLI/etc.: Fix some aesthetic issues; reduce chatty verbose messages · fb5690ce
      Matthew Jordan authored
      This patch addresses some aesthetic issues in Asterisk. These are all just
      minor tweaks to improve the look of the CLI when used in a variety of
      settings. Specifically:
       * A number of chatty verbose messages were removed or demoted to DEBUG
         messages. Verbose messages with a verbosity level of 5 or higher were -
         if kept as verbose messages - demoted to level 4. Several messages
         that were emitted at verbose level 3 were demoted to 4, as announcement
         of dialplan applications being executed occur at level 3 (and so the
         effects of those applications should generally be less).
       * Some verbose messages that only appear when their respective 'debug'
         options are enabled were bumped up to always be displayed.
       * Prefix/timestamping of verbose messages were moved to the verboser
         handlers. This was done to prevent duplication of prefixes when the
         timestamp option (-T) is used with the CLI.
       * Verbose magic is removed from messages before being emitted to
         non-verboser handlers. This prevents the magic in multi-line verbose
         messages (such as SIP debug traces or the output of DumpChan) from
         being written to files.
       * _Slightly_ better support for the "light background" option (-W) was
         added. This includes using ast_term_quit in the output of XML
         documentation help, as well as changing the "Asterisk Ready" prompt to
         bright green on the default background (which stands a better chance of
         being displayed properly than bright white).
      
      Review: https://reviewboard.asterisk.org/r/3547/
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@414798 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fb5690ce
  28. May 02, 2014
    • Mark Michelson's avatar
      Return the number of rows affected by a SQL insert, rather than an object ID. · ff1658ed
      Mark Michelson authored
      The realtime API specifies that the store callback is supposed to return the number
      of rows affected. res_config_pgsql was instead returning an Oid cast as an int, which
      during any nominal execution would be cast to 0. Returning 0 when more than 0 rows were
      inserted causes problems to the function's callers.
      
      To give an idea of how strange code can be, this is the necessary code change to fix
      a device state issue reported against chan_pjsip in Asterisk 12+. The issue was that
      the registrar would attempt to insert contacts into the database. Because of the 0
      return from res_config_pgsql, the registrar would think that the contact was not successfully
      inserted, even though it actually was. As such, even though the contact was query-able
      and it was possible to call the endpoint, Asterisk would "think" the endpoint was unregistered,
      meaning it would report the device state as UNAVAILABLE instead of NOT_INUSE.
      
      The necessary fix applies to all versions of Asterisk, so even though the bug reported
      only applies to Asterisk 12+, the code correction is being inserted into 1.8+.
      
      Closes issue ASTERISK-23707
      Reported by Mark Michelson
      ........
      
      Merged revisions 413224 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 413225 from http://svn.asterisk.org/svn/asterisk/branches/11
      ........
      
      Merged revisions 413226 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@413227 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ff1658ed
  29. Feb 10, 2014
  30. Jan 24, 2014
  31. May 07, 2013
  32. Apr 27, 2013
  33. Oct 14, 2012
  34. Sep 22, 2012
    • Andrew Latham's avatar
      Doxygen Updates Janitor Work · fd98835f
      Andrew Latham authored
      * Whitespace, doc-blocks, spelling, case, missing and incorrect tags.
      * Add cleanup to Makefile for the Doxygen configuration update
      * Start updating Doxygen configuration for cleaner output
      * Enable inclusion of configuration files into documentation
      * remove mantisworkflow...
      * update documentation README
      * Add markup to Tilghman's email and talk with him about updating his email, he knows...
      * no code changes on this commit other than the mentioned Makefile change
      
      (issue ASTERISK-20259)
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373384 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      fd98835f
  35. Sep 21, 2012
    • Andrew Latham's avatar
      Doxygen Updates - janitor work · 6f61cb50
      Andrew Latham authored
      Doxygen updates including mistakes, misspellings, missing parameters, updates for Doxygen style.  Some missing txt file links are removed but their content or essense will be included in some later updates.  A majority of the txt files were removed in the 1.6 era but never noted. The HR and EXTREF are simple changes that make the documentation more compatable with more versions of Doxygen.
      
      Further updates coming.
      
      (issue ASTERISK-20259)
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@373330 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      6f61cb50
  36. Jul 31, 2012
  37. Apr 17, 2012
  38. Feb 13, 2012
  39. Aug 22, 2011
  40. Jul 14, 2011
Loading