Skip to content
Snippets Groups Projects
  1. Jun 28, 2015
    • Matt Jordan's avatar
      Makefile: Remove coverage files on 'make clean' · 9b74dcb6
      Matt Jordan authored
      This patch updates a variety of Makefiles in Asterisk's build system to
      remove .gcda and .gcno files when 'make clean' is executed. These files
      are generated when '--enable-coverage' is passed to the Asterisk
      configure script.
      
      Change-Id: Ib70b41eea2ee2908885bff02e80faf9f40c84602
      9b74dcb6
  2. Jun 08, 2015
    • Corey Farrell's avatar
      Fix unsafe uses of ast_context pointers. · 53658a14
      Corey Farrell authored
      Although ast_context_find, ast_context_find_or_create and
      ast_context_destroy perform locking of the contexts table,
      any context pointer can become invalid at any time that the
      contexts table is unlocked. This change adds locking around
      all complete operations involving these functions.
      
      Places where ast_context_find was followed by ast_context_destroy
      have been replaced with calls ast_context_destroy_by_name.
      
      ASTERISK-25094 #close
      Reported by: Corey Farrell
      
      Change-Id: I1866b6787730c9c4f3f836b6133ffe9c820734fa
      53658a14
  3. May 11, 2015
    • Ivan Poddubny's avatar
      pbx/pbx_spool: Fix issue when call files were executed too early · cc39cfa2
      Ivan Poddubny authored
      pbx_spool used to delete/move the call file upon successful outgoing
      call completion, but did not delete it from in-memory list of files
      (dirlist, used only when compiled with inotify/kqueue support).
      That resulted in an extra attempt to process that filename after
      retrytime seconds.
      Then, if a new file with the same name appears that is scheduled
      in future further than the completed one plus its retrytime,
      then it gets executed earlier than expected.
      
      This patch fixes remove_from_queue function to also remove the entry
      from the dirlist.
      
      ASTERISK-17069 #close
      Reported by: Jeremy Kister
      
      ASTERISK-24442 #close
      Reported by: tootai
      
      Change-Id: If9ec9b88073661ce485d6b008fd0b2612e49a28b
      cc39cfa2
  4. Apr 06, 2015
  5. Dec 17, 2014
    • Walter Doekes's avatar
      Fix printf problems with high ascii characters after r413586 (1.8). · 822abf9e
      Walter Doekes authored
      In r413586 (1.8) various casts were added to silence gcc 4.10 warnings.
      Those fixes included things like:
      
          -out += sprintf(out, "%%%02X", (unsigned char) *ptr);
          +out += sprintf(out, "%%%02X", (unsigned) *ptr);
      
      That works for low ascii characters, but for the high range that yields
      e.g. FFFFFFC3 when C3 is expected.
      
      This changeset:
      - fixes those casts to use the 'hh' unsigned char modifier instead
      - consistently uses %02x instead of %2.2x (or other non-standard usage)
      - adds a few 'h' modifiers in various places
      - fixes a 'replcaes' typo
      - dev/urandon typo (in 13+ patch)
      
      Review: https://reviewboard.asterisk.org/r/4263/
      
      ASTERISK-24619 #close
      Reported by: Stefan27 (on IRC)
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@429673 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      822abf9e
  6. Dec 02, 2014
  7. Nov 05, 2014
    • George Joseph's avatar
      config: Make text_file_save and 'dialplan save' escape semicolons in values. · 03fcc1ad
      George Joseph authored
      When a config file is read, an unescaped semicolon signals comments which are
      stripped from the value before it's stored.  Escaped semicolons are then
      unescaped and become part of the value.  Both of these behaviors are normal
      and expected.  When the config is serialized either by 'dialplan save' or
      AMI/UpdateConfig however, the now unescaped semicolons are written as-is.
      If you actually reload the file just saved, the unescaped semicolons are
      now treated as start of comments.
      
      Since true comments are stripped on read, any semicolons in
      ast_variable.value must have been escaped originally.  This patch
      re-escapes semicolons in ast_variable.values before they're written to
      file either by 'dialplan save' or config/ast_config_text_file_save which
      is called by AMI/UpdateConfig. I also fixed a few pre-existing formatting
      issues nearby in pbx_config.c
      
      Tested-by: George Joseph
      ASTERISK-20127 #close
      
      Review: https://reviewboard.asterisk.org/r/4132/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@427328 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      03fcc1ad
  8. Aug 06, 2014
    • George Joseph's avatar
      pbx_lua: fix regression with global sym export and context clash by pbx_config. · 0430c887
      George Joseph authored
      ASTERISK-23818 (lua contexts being overwritten by contexts of the same name in
      pbx_config) surfaced because pbx_lua, having the AST_MODFLAG_GLOBAL_SYMBOLS
      set, was always force loaded before pbx_config.  Since I couldn't find any
      reason for pbx_lua to export it's symbols to the rest of Asterisk, I simply
      changed the flag to AST_MODFLAG_DEFAULT.  Problem solved.  What I didn't
      realize was that the symbols need to be exported not because Asterisk needs
      them but because any external Lua modules like luasql.mysql need the base
      Lua language APIs exported (ASTERISK-17279).
      
      Back to ASTERISK-23818...  It looks like there's an issue in pbx.c where
      context_merge was only merging includes, switches and ignore patterns if
      the context was already existing AND has extensions, or if the context was
      brand new.  If pbx_lua is loaded before pbx_config, the context will exist
      BUT pbx_lua, being implemented as a switch, will never place extensions in
      it, just the switch statement.  The result is that when pbx_config loads,
      it never merges the switch statement created by pbx_lua into the final
      context.
      
      This patch sets pbx_lua's modflag back to AST_MODFLAG_GLOBAL_SYMBOLS and adds
      an "else if" in context_merge that catches the case where an existing context
      has includes, switchs or ingore patterns but no actual extensions.
      
      ASTERISK-23818 #close
      Reported by: Dennis Guse
      Reported by: Timo Teräs
      Tested by: George Joseph
      Review: https://reviewboard.asterisk.org/r/3891/
      ........
      
      Merged revisions 420146 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@420147 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      0430c887
  9. Jun 19, 2014
  10. May 09, 2014
  11. Jan 08, 2014
  12. Aug 06, 2013
  13. May 10, 2013
  14. Mar 15, 2013
  15. Nov 27, 2012
    • Richard Mudgett's avatar
      Remove unnecessary channel module references. · 37b50fe4
      Richard Mudgett authored
      * Removed call to ast_module_user_hangup_all() in res_config_mysql.c since
      it is effectively a noop.  No channels can attach a reference to that
      module.
      
      * Removed call to ast_module_user_hangup_all() in app_celgenuserevent.c.
      The caller of unload_module() has already called it.
      
      * Removed redundant channel module references in pbx_dundi.c.  The
      registered dialplan function callback dispatchers for the read/read2/write
      callbacks already reference the module before calling.
      
      * pbx_dundi: Moved unregistering CLI commands, DUNDi switch, and dialplan
      functions to the first thing the unload_module() does.  This will reduce
      the chance of new channels using DUNDi services while the module is being
      torn down.
      ........
      
      Merged revisions 376657 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 376658 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@376659 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      37b50fe4
  16. Nov 14, 2012
  17. Oct 08, 2012
    • Richard Mudgett's avatar
      Fix deletion of unopenable spool files. · 337a4c70
      Richard Mudgett authored
      If scan_service() cannot open the spool file, it logs a message saying
      that it will delete the file and calls remove_from_queue() to do it.
      However, remove_from_queue() fails to delete the spool file because struct
      outgoing has not yet been fully initialized.
      
      * Merged allocating a new struct outgoing and init_outgoing() into
      new_outgoing().  Allocation is initialization.
      
      * Made apply_outgoing() not initialize the spool filename in struct
      outgoing.
      
      * Made apply_outgoing() call ast_trim_blanks() and ast_skip_blanks()
      rather than manually inlining them.
      
      * Reduced indentation levels in apply_outgoing().
      
      * Fixed a garbled comment in remove_from_queue().
      
      * Reworked scan_service() to simplify it.
      
      (closes issue ASTERISK-17231)
      Reported by: David Chappell
      Patches:
            spool_open_failure.diff (license #4997) patch uploaded by David Chappell
            Started with this patch.
      ........
      
      Merged revisions 374686 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      
      * Fixed some memory leaks on off nominal paths in init_outgoing() when
      merging into the new_outgoing() function dealing with o->capabilities.
      ........
      
      Merged revisions 374695 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@374708 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      337a4c70
  18. Sep 06, 2012
    • Matthew Jordan's avatar
      Fix DUNDi message routing bug when neighboring peer is unreachable · b763dc98
      Matthew Jordan authored
      Consider a scenario where DUNDi peer PBX1 has two peers that are its neighbors,
      PBX2 and PBX3, and where PBX2 and PBX3 are also neighbors.  If the connection
      is temporarily broken between PBX1 and PBX3, PBX1 should not include PBX3 in
      the list of peers it sends to PBX2 in a DPDISCOVER message, as it cannot send
      messages to PBX3.  If it does, PBX2 will assume that PBX3 already received the
      message and fail to forward the message on to PBX3 itself.  This patch fixes
      this by only including peers in a DPDISCOVER message that are reachable by the
      sending node.  This includes all peers with an empty address
      (00:00:00:00:00:00) and that are have been reached by a qualify message.
      
      This patch also prevents attempting to qualify a dynamic peer with an empty
      address until that peer registers.
      
      The patch uploaded by Peter was modified slightly for this commit.
      
      (closes issue ASTERISK-19309)
      Reported by: Peter Racz
      patches:
        dundi_routing.patch uploaded by Peter Racz (license 6290)
      
      ........
      
      Merged revisions 372417 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 372418 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@372419 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      b763dc98
  19. Aug 21, 2012
  20. Aug 09, 2012
  21. Aug 08, 2012
  22. Jul 31, 2012
    • Kinsey Moore's avatar
      Clean up and ensure proper usage of alloca() · 9b16c8b0
      Kinsey Moore authored
      This replaces all calls to alloca() with ast_alloca() which calls gcc's
      __builtin_alloca() to avoid BSD semantics and removes all NULL checks
      on memory allocated via ast_alloca() and ast_strdupa().
      
      (closes issue ASTERISK-20125)
      Review: https://reviewboard.asterisk.org/r/2032/
      Patch-by: Walter Doekes (wdoekes)
      ........
      
      Merged revisions 370642 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 370643 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370655 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      9b16c8b0
    • Mark Michelson's avatar
      Add "dialplan remove context" and modify "dialplan add include" · 6c23a60f
      Mark Michelson authored
      From corruptor's review board posting:
      
      "I've noticed that we can remove particular extension from context with
      dialplan remove extension command but in order to remove all extensions
      in the context we should delete them on by one. I've created dialplan
      remove context command which uses ast_context_destroy to destroy the
      whole context with all extensions. I've created to functions for in
      pbx_config.c: handle_cli_dialplan_remove_context which actually removes
      context and complete_dialplan_remove_context which completes input.
      They are based on other similar functions and pretty trivial but I can be
      mistaken somewhere.
      
      "I've also modified dialplan add include <context2> into <context1>. I've
      made it similar dialplan add extension ... command. It creates <context1>
      if it doesn't exist and I've also modified complete_dialplan_add_include
      and removed check for existance of <context2> because we can include
      non-existent context into another one. (I usually include empty
      (non-existent) contexts in advance). Should we raise warning in this case
      as it's raised while reading extensions.conf?
      
      "I use those functions with AMI. I think manager commands should be created
      in addition to those CLI commands."
      
      I've addressed the latest comments on review board and have made some other
      coding guidelines-related cleanup. I also have modified the CHANGES file to
      mention these new commands.
      
      (closes issue ASTERISK-19292)
      reported by Andrey Solovyev
      
      Patches:
      	dialplan_add_include.patch
          uploaded by Andrey Solovyev (license #5214)
          dialplan_remove_context.patch
          uploaded by Andrey Solovyev (license #5214)
      
      Review: https://reviewboard.asterisk.org/r/2042
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@370644 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      6c23a60f
  23. Jun 15, 2012
    • Kevin P. Fleming's avatar
      Multiple revisions 369001-369002 · 166b4e2b
      Kevin P. Fleming authored
      ........
        r369001 | kpfleming | 2012-06-15 10:56:08 -0500 (Fri, 15 Jun 2012) | 11 lines
        
        Add support-level indications to many more source files.
        
        Since we now have tools that scan through the source tree looking for files
        with specific support levels, we need to ensure that every file that is
        a component of a 'core' or 'extended' module (or the main Asterisk binary)
        is explicitly marked with its support level. This patch adds support-level
        indications to many more source files in tree, but avoids adding them to
        third-party libraries that are included in the tree and to source files
        that don't end up involved in Asterisk itself.
      ........
        r369002 | kpfleming | 2012-06-15 10:57:14 -0500 (Fri, 15 Jun 2012) | 3 lines
        
        Add a script to enable finding source files without support-levels defined.
      ........
      
      Merged revisions 369001-369002 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 369005 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@369013 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      166b4e2b
  24. Jun 11, 2012
  25. May 31, 2012
  26. May 14, 2012
  27. May 10, 2012
  28. May 04, 2012
  29. Apr 12, 2012
  30. Apr 04, 2012
  31. Mar 08, 2012
  32. Feb 29, 2012
  33. Feb 27, 2012
  34. Feb 20, 2012
  35. Feb 13, 2012
  36. Feb 06, 2012
  37. Feb 01, 2012
Loading