Skip to content
Snippets Groups Projects
  1. Nov 15, 2021
    • Josh Soref's avatar
      res: Spelling fixes · dcf492e7
      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
      dcf492e7
  2. Aug 25, 2021
  3. Nov 21, 2018
  4. Dec 22, 2017
  5. Sep 19, 2017
  6. Sep 13, 2017
    • Sean Bright's avatar
      res_calendar: Various fixes · d8112cd9
      Sean Bright authored
      * The way that we were looking at XML elements for CalDAV was extremely
        fragile, so use SAX2 for increased robustness.
      
      * Don't complain about a 'channel' not be specified if autoreminder is
        not set. Assume that if 'channel' is not set, we don't want to be
        notified.
      
      * Fix some truncated CLI output in 'calendar show calendar' and make the
        'Autoreminder' description a bit more clear
      
      ASTERISK-24588 #close
      Reported by: Stefan Gofferje
      
      ASTERISK-25523 #close
      Reported by: Jesper
      
      Change-Id: I200d11afca6a47e7d97888f286977e2e69874b2c
      d8112cd9
  7. Sep 05, 2017
  8. 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
  9. Apr 12, 2017
    • George Joseph's avatar
      modules: change module LOAD_FAILUREs to LOAD_DECLINES · 747beb1e
      George Joseph authored
      In all non-pbx modules, AST_MODULE_LOAD_FAILURE has been changed
      to AST_MODULE_LOAD_DECLINE.  This prevents asterisk from exiting
      if a module can't be loaded.  If the user wishes to retain the
      FAILURE behavior for a specific module, they can use the "require"
      or "preload-require" keyword in modules.conf.
      
      A new API was added to logger: ast_is_logger_initialized().  This
      allows asterisk.c/check_init() to print to the error log once the
      logger subsystem is ready instead of just to stdout.  If something
      does fail before the logger is initialized, we now print to stderr
      instead of stdout.
      
      Change-Id: I5f4b50623d9b5a6cb7c5624a8c5c1274c13b2b25
      747beb1e
  10. Dec 31, 2016
    • Martin Tomec's avatar
      res_calendar: delete old calendars after reload · aad29b9b
      Martin Tomec authored
      When "fetch_again_at_reload" is set in config, we create now
      new object and thread for each reloaded calendar (with new
      configuration). Old calendar should be then unlinked, so the
      old thread can exit and free memory.
      
      ASTERISK-26683
      
      Change-Id: Ic17fba9371c5a8b26a6bc54ea4957c13a32a343e
      aad29b9b
  11. 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
  12. Oct 10, 2016
    • Ludovic Gasc (GMLudo)'s avatar
      res_calendar: Add support for fetching calendars when reloading · 9f62feca
      Ludovic Gasc (GMLudo) authored
      We use a lot res_calendar, we are very happy with that, especially
      because you use libical, the almost alone opensource library that
      supports really ical format with all types of recurrency.
      
      Nevertheless, some features are missed for our business use cases.
      
      This first patch adds a new option in calendar.conf:
      fetch_again_at_reload. Be my guest for a better name.
      
      If it's true, when you'll launch "module reload res_calendar.so",
      Asterisk will download again the calendar.
      
      The business use case is that we have a WebUI with a scheduler planner,
      we know when the calendars are modified.
      
      For now, we need to define 1 minute of timeout to have a chance that
      our user doesn't wait too long between the modification and the real
      test.  But it generates a lot of useless HTTP traffic.
      
      
      ASTERISK-26422 #close
      
      Change-Id: I384b02ebfa42b142bbbd5b7221458c7f4dee7077
      9f62feca
  13. Jan 10, 2016
  14. May 13, 2015
  15. 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
  16. Mar 30, 2015
  17. Nov 19, 2014
  18. Jul 25, 2014
    • Mark Michelson's avatar
      Add module support level to ast_module_info structure. Print it in CLI "module show" . · dcf1ad14
      Mark Michelson authored
      ASTERISK-23919 #close
      Reported by Malcolm Davenport
      
      Review: https://reviewboard.asterisk.org/r/3802
      
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419592 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      dcf1ad14
    • Matthew Jordan's avatar
      module loader: Unload modules in reverse order of their start order · ba9867fa
      Matthew Jordan authored
      When Asterisk starts a module (calling its load_module function), it re-orders
      the module list, sorting it alphabetically. Ostensibly, this was done so that
      the output of 'module show' listed modules in alphabetic order. This had the
      unfortunate side effect of making modules with complex usage patterns
      unloadable. A module that has a large number of modules that depend on it is
      typically abandoned during the unloading process. This results in its memory
      not being reclaimed during exit.
      
      Generally, this isn't harmful - when the process is destroyed, the operating
      system will reclaim all memory allocated by the process. Prior to Asterisk 12,
      we also didn't have many modules with complex dependencies. However, with
      the advent of ARI and PJSIP, this can make make unloading those modules
      successfully nearly impossible, and thus tracking memory leaks or ref debug
      leaks a real pain.
      
      While this patch is not a complete overhaul of the module loader - such an
      effort would be beyond the scope of what could be done for Asterisk 13 -
      this does make some marginal improvements to the loader such that modules
      like res_pjsip or res_stasis *may* be made properly un-loadable in the future.
      
      1. The linked list of modules has been replaced with a doubly linked list. This
         allows traversal of the module list to occur backwards. The module shutdown
         routine now walks the global list backwards when it attempts to unload
         modules.
      2. The alphabetic reorganization of the module list on startup has been
         removed. Instead, a started module is placed at the end of the module list.
      3. The ast_update_module_list function - which is used by the CLI to display
         the modules - now does the sorting alphabetically itself. It creates its own
         linked list and inserts the modules into it in alphabetic order. This allows
         for the intent of the previous code to be maintained.
      
      This patch also contains a fix for res_calendar. Without calendar.conf, the
      calendar modules were improperly bumping the use count of res_calendar, then
      failing to load themselves. This patch makes it so that we detect whether or
      not calendaring is enabled before altering the use count.
      
      Review: https://reviewboard.asterisk.org/r/3777/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419563 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      ba9867fa
  19. Jul 20, 2014
  20. May 09, 2014
  21. Mar 27, 2014
  22. Mar 07, 2014
    • Scott Griepentrog's avatar
      uniqueid: channel linkedid, ami, ari object creation with id's · 80ef9a21
      Scott Griepentrog authored
      Much needed was a way to assign id to objects on creation, and
      much change was necessary to accomplish it.  Channel uniqueids
      and linkedids are split into separate string and creation time
      components without breaking linkedid propgation.  This allowed
      the uniqueid to be specified by the user interface - and those
      values are now carried through to channel creation, adding the
      assignedids value to every function in the chain including the
      channel drivers. For local channels, the second channel can be
      specified or left to default to a ;2 suffix of first.  In ARI,
      bridge, playback, and snoop objects can also be created with a
      specified uniqueid.
      
      Along the way, the args order to allocating channels was fixed
      in chan_mgcp and chan_gtalk, and linkedid is no longer lost as
      masquerade occurs.
      
      (closes issue ASTERISK-23120)
      Review: https://reviewboard.asterisk.org/r/3191/
      ........
      
      Merged revisions 410157 from http://svn.asterisk.org/svn/asterisk/branches/12
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410158 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      80ef9a21
  23. Dec 18, 2013
  24. Jun 25, 2013
    • Matthew Jordan's avatar
      Fix memory/ref counting leaks in a variety of locations · 13b470d7
      Matthew Jordan authored
      This patch fixes the following memory leaks:
       * http.c: The structure containing the addresses to bind to was not being
         deallocated when no longer used
       * named_acl.c: The global configuration information was not disposed of
       * config_options.c: An invalid read was occurring for certain option types.
       * res_calendar.c: The loaded calendars on module unload were not being
         properly disposed of.
       * chan_motif.c: The format capabilities needed to be disposed of on module
         unload. In addition, this now specifies the default options for the
         maxpayloads and maxicecandidates in such a way that it doesn't cause the
         invalid read in config_options.c to occur.
      
      (issue ASTERISK-21906)
      Reported by: John Hardin
      patches:
        http.patch uploaded by jhardin (license 6512)
        named_acl.patch uploaded by jhardin (license 6512)
        config_options.patch uploaded by jhardin (license 6512)
        res_calendar.patch uploaded by jhardin (license 6512)
        chan_motif.patch uploaded by jhardin (license 6512)
      ........
      
      Merged revisions 392810 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392812 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      13b470d7
  25. Jan 02, 2013
    • Automerge script's avatar
      Merged revisions 378322 via svnmerge from · 675914bb
      Automerge script authored
      file:///srv/subversion/repos/asterisk/trunk
      
      ................
        r378322 | mjordan | 2013-01-02 12:11:59 -0600 (Wed, 02 Jan 2013) | 33 lines
        
        Prevent exhaustion of system resources through exploitation of event cache
        
        Asterisk maintains an internal cache for devices in the event subsystem. The
        device state cache holds the state of each device known to Asterisk, such that
        consumers of device state information can query for the last known state for
        a particular device, even if it is not part of an active call. The concept of
        a device in Asterisk can include entities that do not have a physical
        representation. One way that this occurred was when anonymous calls are allowed
        in Asterisk. A device was automatically created and stored in the cache for
        each anonymous call that occurred; this was possible in the SIP and IAX2
        channel drivers and through channel drivers that utilized the
        res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
        are never removed from the system, allowing anonymous calls to potentially
        exhaust a system's resources.
        
        This patch changes the event cache subsystem and device state management to
        no longer cache devices that are not associated with a physical entity.
        
        (issue ASTERISK-20175)
        Reported by: Russell Bryant, Leif Madsen, Joshua Colp
        Tested by: kmoore
        patches:
          event-cachability-3.diff uploaded by jcolp (license 5000)
        ........
        
        Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
        ........
        
        Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
        ........
        
        Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11
      ................
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/team/mmichelson/threadpool@378329 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      675914bb
    • Matthew Jordan's avatar
      Prevent exhaustion of system resources through exploitation of event cache · 8fb5bdce
      Matthew Jordan authored
      Asterisk maintains an internal cache for devices in the event subsystem. The
      device state cache holds the state of each device known to Asterisk, such that
      consumers of device state information can query for the last known state for
      a particular device, even if it is not part of an active call. The concept of
      a device in Asterisk can include entities that do not have a physical
      representation. One way that this occurred was when anonymous calls are allowed
      in Asterisk. A device was automatically created and stored in the cache for
      each anonymous call that occurred; this was possible in the SIP and IAX2
      channel drivers and through channel drivers that utilized the
      res_jabber/res_xmpp resource modules (Gtalk, Jingle, and Motif). These devices
      are never removed from the system, allowing anonymous calls to potentially
      exhaust a system's resources.
      
      This patch changes the event cache subsystem and device state management to
      no longer cache devices that are not associated with a physical entity.
      
      (issue ASTERISK-20175)
      Reported by: Russell Bryant, Leif Madsen, Joshua Colp
      Tested by: kmoore
      patches:
        event-cachability-3.diff uploaded by jcolp (license 5000)
      ........
      
      Merged revisions 378303 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 378320 from http://svn.asterisk.org/svn/asterisk/branches/10
      ........
      
      Merged revisions 378321 from http://svn.asterisk.org/svn/asterisk/branches/11
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@378322 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      8fb5bdce
  26. Oct 14, 2012
  27. Oct 01, 2012
  28. May 18, 2012
    • Matthew Jordan's avatar
      Fix a variety of memory leaks · 7b513206
      Matthew Jordan authored
      This patch addresses a number of memory leaks in a variety of modules that were
      found by a static analysis tool.  A brief summary of the changes:
      
      * app_minivm:       free ast_str objects on off nominal paths
      * app_page:         free the ast_dial object if the requested channel technology
                          cannot be appended to the dialing structure
      * app_queue:        if a penalty rule failed to match any existing rule list
                          names, the created rule would not be inserted and its memory
                          would be leaked
      * app_read:         dispose of the created silence detector in the presence of
                          off nominal circumstances
      * app_voicemail:    dispose of an allocated unique ID field for MWI event
                          un-subscribe requests in off nominal paths; dispose of
                          configuration objects when using the secret.conf option
      * chan_dahdi:       dispose of the allocated frame produced by ast_dsp_process
      * chan_iax2:        properly unref peer in CLI command "iax2 unregister"
      * chan_sip:         dispose of the allocated frame produced by sip_rtp_read's
                          call of ast_dsp_process; free memory in parse unit tests
      * func_dialgroup:   properly deref ao2 object grhead in nominal path of
                          dialgroup_read
      * func_odbc:        free resultset in off nominal paths of odbc_read
      * cli:              free match_list in off nominal paths of CLI match completion
      * config:           free comment_buffer/list_buffer when configuration file load
                          is unchanged; free the same buffers any time they were
                          created and config files were processed
      * data:             free XML nodes in various places
      * enum:             free context buffer in off nominal paths
      * features:         free ast_call_feature in off nominal paths of applicationmap
                          config processing
      * netsock2:         users of ast_sockaddr_resolve pass in an ast_sockaddr struct
                          that is allocated by the method.  Failures in
                          ast_sockaddr_resolve could result in the users of the method
                          not knowing whether or not the buffer was allocated.  The
                          method will now not allocate the ast_sockaddr struct if it
                          will return failure.
      * pbx:              cleanup hash table traversals in off nominal paths; free
                          ignore pattern buffer if it already exists for the specified
                          context
      * xmldoc:           cleanup various nodes when we no longer need them
      * main/editline:    various cleanup of pointers not being freed before being
                          assigned to other memory, cleanup along off nominal paths
      * menuselect/mxml:  cleanup of value buffer for an attribute when that attribute
                          did not specify a value
      * res_calendar*:    responses are allocated via the various *_request method
                          returns and should not be allocated in the various
                          write_event methods; ensure attendee buffer is freed if no
                          data exists in the parsed node; ensure that calendar objects
                          are de-ref'd appropriately
      * res_jabber:       free buffer in off nominal path
      * res_musiconhold:  close the DIR* object in off nominal paths
      * res_rtp_asterisk: if we run out of ports, close the rtp socket object and free
                          the rtp object
      * res_srtp:         if we fail to create the session in libsrtp, destroy the
                          temporary ast_srtp object
      
      (issue ASTERISK-19665)
      Reported by: Matt Jordan
      
      Review: https://reviewboard.asterisk.org/r/1922
      ........
      
      Merged revisions 366880 from http://svn.asterisk.org/svn/asterisk/branches/1.8
      ........
      
      Merged revisions 366881 from http://svn.asterisk.org/svn/asterisk/branches/10
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@366917 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      7b513206
  29. Feb 24, 2012
  30. Feb 22, 2012
  31. Feb 20, 2012
  32. Feb 13, 2012
  33. Feb 01, 2012
  34. Jan 27, 2012
    • Terry Wilson's avatar
      Add aresult variable for CALENDAR_WRITE · 5bfea5fd
      Terry Wilson authored
      This patch adds a CALENDAR_SUCCESS=1/0 variable that is set to show whether or
      not CALENDAR_WRITE has passed. This patch also adds some debugging for caldav
      PUT responses and no longer treats responses with no body as an error (as a PUT
      gets a 201 Created with no body).
      
      (closes issue ASTERISK-16903)
      Reported by: Clod Patry
      Tested by: Terry Wilson
      Patches:
        	calendarstatus.diff uploaded by Clod Patry (License #5138), slightly modified by Terry Wilson
      
      Review: https://reviewboard.asterisk.org/r/1692/
      - This line, and those below, will be ignored--
      
      M    res/res_calendar.c
      M    res/res_calendar_exchange.c
      M    res/res_calendar_caldav.c
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@352916 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      5bfea5fd
  35. Jan 09, 2012
    • Terry Wilson's avatar
      Replace direct access to channel name with accessor functions · 04da92c3
      Terry Wilson authored
      There are many benefits to making the ast_channel an opaque handle, from
      increasing maintainability to presenting ways to kill masquerades. This patch
      kicks things off by taking things a field at a time, renaming the field to
      '__do_not_use_${fieldname}' and then writing setters/getters and converting the
      existing code to using them. When all fields are done, we can move ast_channel
      to a C file from channel.h and lop off the '__do_not_use_'.
      
      This patch sets up main/channel_interal_api.c to be the only file that actually
      accesses the ast_channel's fields directly. The intent would be for any API
      functions in channel.c to use the accessor functions. No more monkeying around
      with channel internals. We should use our own APIs.
      
      The interesting changes in this patch are the addition of
      channel_internal_api.c, the moving of the AST_DATA stuff from channel.c to
      channel_internal_api.c (note: the AST_DATA stuff will have to be reworked to
      use accessor functions when ast_channel is really opaque), and some re-working
      of the way channel iterators/callbacks are handled so as to avoid creating fake
      ast_channels on the stack to pass in matching data by directly accessing fields
      (since "name" is a stringfield and the fake channel doesn't init the
      stringfields, you can't use the ast_channel_name_set() function). I went with
      ast_channel_name(chan) for a getter, and ast_channel_name_set(chan, name) for a
      setter.
      
      The majority of the grunt-work for this change was done by writing a semantic
      patch using Coccinelle ( http://coccinelle.lip6.fr/ ).
      
      Review: https://reviewboard.asterisk.org/r/1655/
      
      
      git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@350223 65c4cc65-6c06-0410-ace0-fbb531ad65f3
      04da92c3
  36. Oct 30, 2011
  37. Jul 14, 2011
Loading