Commit Graph

40 Commits

Author SHA1 Message Date
Naveen Albert f485d3cc8b general: Fix broken links.
This fixes a number of broken links throughout the
tree, mostly caused by wiki.asterisk.org being replaced
with docs.asterisk.org, which should eliminate the
need for sporadic fixes as in f28047db36.

Resolves: #430
(cherry picked from commit 3bb34477d4)
2024-01-12 18:32:13 +00:00
Naveen Albert 335c69ead4 documentation: Adds missing default attributes.
The configObject tag contains a default attribute which
allows the default value to be specified, if applicable.
This allows for the default value to show up specially on
the wiki in a way that is clear to users.

There are a couple places in the tree where default values
are included in the description as opposed to as attributes,
which means these can't be parsed specially for the wiki.
These are changed to use the attribute instead of being
included in the text description.

ASTERISK-29898 #close

Change-Id: I9d7ea08f50075f41459ea7b76654906b674ec755
2022-02-23 13:26:22 -06:00
Alexander Traud 634e3ebdb8 res_ari: Fix for Doxygen.
ASTERISK-29756

Change-Id: I2f1c1eea1c902492b77b74de9950f20ebbb7e758
2021-11-18 16:25:51 -06:00
Josh Soref 9ae9893c63 res: Spelling fixes
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
2021-11-15 16:37:34 -06:00
George Joseph 8da4e28a81 res_ari.c: Prefer exact handler match over wildcard
Given the following request path and 2 handler paths...
Request: /channels/externalMedia
Handler: /channels/{channelId}      "wildcard"
Handler: /channels/externalmedia    "non-wildcard"

...if /channels/externalMedia was registered as a handler after
/channels/{channelId} as shown above, the request would automatically
match the wildcard handler and attempt to parse "externalMedia" into
the channelId variable which isn't what was intended.  It'd work
if the non-wildard entry was defined in rest-api/api-docs/channels.json
before the wildcard entry but that makes the json files
order-dependent which isn't a good thing.

To combat this issue, the search loop saves any wildcard match but
continues looking for exact matches at the same level.  If it finds
one, it's used.  If it hasn't found an exact match at the end of
the current level, the wildcard is used.  Regardless, after
searching the current level, the wildcard is cleared so it won't
accidentally match for a different object or a higher level.

BTW, it's currently not possible for more than 1 wildcard entry
to be defined for a level.  For instance, there couldn't be:
Handler: /channels/{channelId}
Handler: /channels/{channelName}
We wouldn't know which one to match.

Change-Id: I574aa3cbe4249c92c30f74b9b40e750e9002f925
2019-08-20 13:19:42 -05:00
Joshua Colp de3ca9bada res_ari: Remove requirement that body exists when debug is on.
The "ari set debug" code for incoming requests incorrectly assumed
that all requests would contain a body. If one did not exist the
request would be incorrectly rejected. The response that was sent
was also incomplete as an incorrect function was used to construct
the response.

The code has now been changed to no longer require a request to have
a body and the response updated to use the correct function.

ASTERISK-27801

Change-Id: I4eef036ad54550a4368118cc348765ecac25e0f8
2018-05-03 05:37:01 -06:00
Corey Farrell 572a508ef2 loader: Convert reload_classes to built-in modules.
* 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
2018-03-14 05:20:12 -04:00
Corey Farrell 527cf5a570 Remove redundant module checks and references.
This removes references that are no longer needed due to automatic
references created by module dependencies.

In addition this removes most calls to ast_module_check as they were
checking modules which are listed as dependencies.

Change-Id: I332a6e8383d4c72c8e89d988a184ab8320c4872e
2018-01-24 13:37:29 -05:00
Corey Farrell 9cfdb81e91 loader: Add dependency fields to module structures.
* Declare 'requires' and 'enhances' text fields on module info structure.
* Rename 'nonoptreq' to 'optional_modules'.
* Update doxygen comments.

Still need to investigate dependencies among modules I cannot compile.

Change-Id: I3ad9547a0a6442409ff4e352a6d897bef2cc04bf
2018-01-15 13:25:51 -05:00
Joshua Colp ac7ec5026c Merge "Add missing menuselect dependencies." 2017-11-06 09:26:18 -06:00
Richard Mudgett 79ddcdbc70 Stasis/ARI: Fix off-nominal path json memory leaks.
Change-Id: Id569c624c426e3b22a99936473c730592d8b83fb
2017-11-03 13:14:07 -05:00
Corey Farrell 606ae3484a Add missing menuselect dependencies.
This adds menuselect dependencies for modules that use symbols of other
modules.

ASTERISK-27390

Change-Id: Ia2d2849f5b87a72af7324a82edc3f283eafb5385
2017-11-02 02:57:52 -04:00
hajekd a0a1f95abf res/res_ari.c Fix: Memory leaks in ARI when using Content-Type: application/json
ASTERISK-27305
Reported by: David Hajek
Tested by: David Hajek

Change-Id: Ife3e289062e6cf7d0e7d342dbf79ed96feff441e
2017-10-09 08:05:31 -05:00
George Joseph 747beb1ed1 modules: change module LOAD_FAILUREs to LOAD_DECLINES
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
2017-04-12 15:57:21 -06:00
George Joseph 6691606723 ari: Implement 'debug all' and request/response logging
The 'ari set debug' command has been enhanced to accept 'all' as an
application name.  This allows dumping of all apps even if an app
hasn't registered yet.  To accomplish this, a new global_debug global
variable was added to res/stasis/app.c and new APIs were added to
set and query the value.

'ari set debug' now displays requests and responses as well as events.
This required refactoring the existing debug code.

* The implementation for 'ari set debug' was moved from stasis/cli.{c,h}
  to ari/cli.{c,h}, and stasis/cli.{c,h} were deleted.
* In order to print the body of incoming requests even if a request
  failed, the consumption of the body was moved from the ari stubs
  to ast_ari_callback in res_ari.c and the moustache templates were
  then regenerated.  The body is now passed to ast_ari_invoke and then
  on to the handlers.  This results in code savings since that template
  was inserted multiple times into all the stubs.

An additional change was made to the ao2_str_container implementation
to add partial key searching and a sort function.  The existing cli
code assumed it was already there when it wasn't so the tab completion
was never working.

Change-Id: Ief936f747ce47f1fb14035fbe61152cf766406bf
(cherry picked from commit 1d890874f3)
2017-01-23 10:25:58 -07:00
Sebastien Duthil c6d755de11 res_ari: Add support for channel variables in ARI events.
This works the same as for AMI manager variables. Set
"channelvars=foo,bar" in your ari.conf general section, and then the
channel variables "foo" and "bar" (along with their values), will
appear in every Stasis websocket channel event.

ASTERISK-26492 #close
patches:
  ari_vars.diff submitted by Mark Michelson

Change-Id: I5609ba239259577c0948645df776d7f3bc864229
2016-11-14 13:51:56 -05:00
Corey Farrell a6e5bae3ef Remove ASTERISK_REGISTER_FILE.
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
2016-10-27 09:53:55 -04:00
Torrey Searle c1b6a79686 res_ari: Add http prefix to generated docs
updated the uri handler to include the url prefix of the http server
this enables res_ari to add it to the uris when generating docs

Change-Id: I279335a2625261a8492206c37219698f42591c2e
(cherry picked from commit 6f448f32fe)
2016-08-19 16:58:55 -05:00
Matt Jordan e773e3a9bb ARI: Add the ability to download the media associated with a stored recording
This patch adds a new feature to ARI that allows a client to download
the media associated with a stored recording. The new route is
/recordings/stored/{name}/file, and transmits the underlying binary file
using Asterisk's HTTP server's underlying file transfer facilities.

Because this REST route returns non-JSON, a few small enhancements had
to be made to the Python Swagger generation code, as well as the
mustache templates that generate the ARI bindings.

ASTERISK-26042 #close

Change-Id: I49ec5c4afdec30bb665d9c977ab423b5387e0181
2016-05-20 09:06:12 -05:00
Sean Bright 14938184a3 res_ari: Correct Location headers returned by some ARI resources
The Location headers returned by:

 * /bridges/{bridgeId}/play
 * /bridges/{bridgeId}/record
 * /channels/{channelId}/play
 * /channels/{channelId}/record

Did not have the '/ari' prefix, and in the case of the 'play' resources, were
using 'playback' instead of 'playbacks.'

Change-Id: I957c58a3a1471bf477dae7c67faa1b74fcd9241c
2016-05-14 12:48:59 -05:00
Richard Mudgett 1f0a9f8a76 res_ari.c: Add missing off nominal unlock and remove a RAII_VAR().
Change-Id: I0c5e7b34057f26dadb39489c4dac3015c52f5dbf
2015-08-18 16:38:19 -05:00
Benjamin Ford 9d458b8311 ARI: Added new functionality to reload a single module.
An http request can be sent to reload an Asterisk module. If the
module can not be reloaded or is not already loaded, an error
response will be returned.

The command "curl -v -u user:pass -X PUT 'http://localhost:8088
/ari/asterisk/modules/{moduleName}'" (or something similar, based
on configuration) can be run in the terminal to access this new
functionality.

For more information, see:
https://wiki.asterisk.org/wiki.display/~bford/Asterisk+ARI+Resource

* Added new ARI functionality
* Asterisk modules can be reloaded through http requests

ASTERISK-25173

Change-Id: I289188bcae182b2083bdbd9ebfffd50b62f58ae1
2015-07-14 13:17:30 -05:00
Rodrigo Ramírez Norambuena eec010829a AST_MODULE_INFO: Format corrections to the usages of AST_MODULE_INFO macro.
Change-Id: Icf88f9f861c6b2a16e5f626ff25795218a6f2723
2015-05-13 16:34:23 -05:00
Matt Jordan 4a58261694 git migration: Refactor the ASTERISK_FILE_VERSION macro
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
2015-04-13 03:48:57 -04:00
Mark Michelson dcf1ad14da Add module support level to ast_module_info structure. Print it in CLI "module show" .
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
2014-07-25 16:47:17 +00:00
Richard Mudgett 9b10813a2b res_ari: Fix some off-nominal paths just dropping the HTTP connection.
* Removed some incorrect newlines on ast_http_error() messages in
manager.c.

* Removed an incorrect newline in res_ari_channels.c.

Addendum to ASTERISK-23552
........

Merged revisions 417932 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417933 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 19:06:12 +00:00
Richard Mudgett dbec5e0d8d HTTP: Add persistent connection support.
Persistent HTTP connection support is needed due to the increased usage of
the Asterisk core HTTP transport and the frequency at which REST API calls
are going to be issued.

* Add http.conf session_keep_alive option to enable persistent
connections.

* Parse and discard optional chunked body extension information and
trailing request headers.

* Increased the maximum application/json and
application/x-www-form-urlencoded body size allowed to 4k.  The previous
1k was kind of small.

* Removed a couple inlined versions of ast_http_manid_from_vars() by
calling the function.  manager.c:generic_http_callback() and
res_http_post.c:http_post_callback()

* Add missing va_end() in ast_ari_response_error().

* Eliminated unnecessary RAII_VAR() use in http.c:auth_create().

ASTERISK-23552 #close
Reported by: Scott Griepentrog

Review: https://reviewboard.asterisk.org/r/3691/
........

Merged revisions 417880 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417901 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-07-03 17:16:55 +00:00
Matthew Jordan 365ae7523b res_http_websocket: Close websocket correctly and use careful fwrite
When a client takes a long time to process information received from Asterisk,
a write operation using fwrite may fail to write all information. This causes
the underlying file stream to be in an unknown state, such that the socket
must be disconnected. Unfortunately, there are two problems with this in
Asterisk's existing websocket code:
1. Periodically, during the read loop, Asterisk must write to the connected
   websocket to respond to pings. As such, Asterisk maintains a reference to
   the session during the loop. When ast_http_websocket_write fails, it may
   cause the session to decrement its ref count, but this in and of itself
   does not break the read loop. The read loop's write, on the other hand,
   does not break the loop if it fails. This causes the socket to get in a
   'stuck' state, preventing the client from reconnecting to the server.
2. More importantly, however, is that the fwrite in ast_http_websocket_write
   fails with a large volume of data when the client takes awhile to process
   the information. When it does fail, it fails writing only a portion of
   the bytes. With some debugging, it was shown that this was failing in a
   similar fashion to ASTERISK-12767. Switching this over to ast_careful_fwrite
   with a long enough timeout solved the problem.

Note that this version of the patch, unlike r417310 in Asterisk 11, exposes
configuration options beyond just chan_sip's sip.conf. Configuration options
to configure the write timeout have also been added to pjsip.conf and ari.conf.

#ASTERISK-23917 #close
Reported by: Matt Jordan

Review: https://reviewboard.asterisk.org/r/3624/
........

Merged revisions 417310 from http://svn.asterisk.org/svn/asterisk/branches/11
........

Merged revisions 417311 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@417317 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-06-26 12:21:14 +00:00
Kinsey Moore 9a85fc0aa0 ARI: Add debug logging for events and responses
This adds DEBUG level logging for ARI websocket events and HTTP
responses similar to what is available for AMI. Logging for ARI HTTP
requests is already adequate for debugging purposes.
........

Merged revisions 412565 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412566 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-18 14:25:47 +00:00
Richard Mudgett 45ade68cb4 Remove unused RAII_VAR() declarations.
* Remove unused RAII_VAR() declarations.  The compiler cannot catch these
because the cleanup function "references" the unused variable.  Some
actually allocated and released resources that were never used.

* Fixed some whitespace issues in stasis_bridges.c.
........

Merged revisions 412399 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@412400 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-04-15 18:01:47 +00:00
Matthew Jordan e33e003f78 res_ari: Fix documentation schema error
........

Merged revisions 410890 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410891 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-19 02:33:55 +00:00
Rusty Newton 35fb3a564b res_ari: Add notes about Asterisk HTTP server to the "enabled" config option for the res_ari general section
Added note and see-also reminding user to enable the HTTP server.

(closes issue ASTERISK-22499)
Reported by: Rusty Newton
........

Merged revisions 410876 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410877 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-03-18 23:32:00 +00:00
Joshua Colp 0e279c215e res_ari: Make some additional error responses consistent with the rest of the system.
This change makes some error cases use ast_ari_response_error to construct their
error responses instead of manually doing it. This ensures they are consistent
with the other error responses.

Based on the original patch as done by Paul Belanger on the associated review.

Review: https://reviewboard.asterisk.org/r/2904/
........

Merged revisions 408957 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408958 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-26 17:04:38 +00:00
Joshua Colp 8585340b87 res_ari: Fix various memory leaks.
This change fixes a few memory leaks that were found based
on a mailing list post.

1. Some JSON response messages were never freed. This was
caused by the documentation stating that message references
were stolen when in reality they were not. The code now follows
the documentation and usage has been updated.

2. HTTP response headers were never freed.

3. The variable list for wildcards paths was never freed.

(closes issue ASTERISK-23128)
Reported by: Kenneth Watson (on list)

Review: https://reviewboard.asterisk.org/r/3119/
........

Merged revisions 405325 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405326 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-01-12 22:24:27 +00:00
David M. Lee fccb427c88 ari:Add application/json parameter support
The patch allows ARI to parse request parameters from an incoming JSON
request body, instead of requiring the request to come in as query
parameters (which is just weird for POST and DELETE) or form
parameters (which is okay, but a bit asymmetric given that all of our
responses are JSON).

For any operation that does _not_ have a parameter defined of type
body (i.e. "paramType": "body" in the API declaration), if a request
provides a request body with a Content type of "application/json", the
provided JSON document is parsed and searched for parameters.

The expected fields in the provided JSON document should match the
query parameters defined for the operation. If the parameter has
'allowMultiple' set, then the field in the JSON document may
optionally be an array of values.

(closes issue ASTERISK-22685)
Review: https://reviewboard.asterisk.org/r/2994/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403177 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-27 15:48:39 +00:00
David M. Lee 97a8debd90 ari: Add application/x-www-form-urlencoded parameter support
ARI POST calls only accept parameters via the URL's query string.
While this works, it's atypical for HTTP API's in general, and
specifically frowned upon with RESTful API's.

This patch adds parsing for application/x-www-form-urlencoded request
bodies if they are sent in with the request. Any variables parsed this
way are prepended to the variable list supplied by the query string.

(closes issue ASTERISK-22743)
Review: https://reviewboard.asterisk.org/r/2986/
........

Merged revisions 402555 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@402557 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-11-08 17:29:53 +00:00
David M. Lee c87aae26f8 Fixed malformed Access-Control-Allow-Methods header. Was causing Safari to barf on POST and DELETE.
........

Merged revisions 401106 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@401316 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-21 18:59:22 +00:00
Richard Mudgett 97fcd6366d MALLOC_DEBUG: Fix some misuses of free() when MALLOC_DEBUG is enabled.
* There were several places in ARI where an external library was mallocing
memory that must always be released with free().  When MALLOC_DEBUG is
enabled, free() is redirected to the MALLOC_DEBUG version.  Since the
external library call still uses the normal malloc(), MALLOC_DEBUG
complains that the freed memory block is not registered and will not free
it.  These cases must use ast_std_free().

* Changed calls to asprintf() and vasprintf() to the equivalent
ast_asprintf() and ast_vasprintf() versions respectively.
........

Merged revisions 400270 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@400271 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-10-02 17:12:49 +00:00
David M. Lee 9bed50db41 optional_api: Fix linking problems between modules that export global symbols
With the new work in Asterisk 12, there are some uses of the
optional_api that are prone to failure. The details are rather involved,
and captured on [the wiki][1].

This patch addresses the issue by removing almost all of the magic from
the optional API implementation. Instead of relying on weak symbol
resolution, a new optional_api.c module was added to Asterisk core.

For modules providing an optional API, the pointer to the implementation
function is registered with the core. For modules that use an optional
API, a pointer to a stub function, along with a optional_ref function
pointer are registered with the core. The optional_ref function pointers
is set to the implementation function when it's provided, or the stub
function when it's now.

Since the implementation no longer relies on magic, it is now supported
on all platforms. In the spirit of choice, an OPTIONAL_API flag was
added, so we can disable the optional_api if needed (maybe it's buggy on
some bizarre platform I haven't tested on)

The AST_OPTIONAL_API*() macros themselves remained unchanged, so
existing code could remain unchanged. But to help with debugging the
optional_api, the patch limits the #include of optional API's to just
the modules using the API. This also reduces resource waste maintaining
optional_ref pointers that aren't used.

Other changes made as a part of this patch:
 * The stubs for http_websocket that wrap system calls set errno to
   ENOSYS.

 * res_http_websocket now properly increments module use count.

 * In loader.c, the while() wrappers around dlclose() were removed. The
   while(!dlclose()) is actually an anti-pattern, which can lead to
   infinite loops if the module you're attempting to unload exports a
   symbol that was directly linked to.

 * The special handling of nonoptreq on systems without weak symbol
   support was removed, since we no longer rely on weak symbols for
   optional_api.

 [1]: https://wiki.asterisk.org/wiki/x/wACUAQ

(closes issue ASTERISK-22296)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2797/
........

Merged revisions 397989 from http://svn.asterisk.org/svn/asterisk/branches/12


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@397990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-30 13:40:27 +00:00
Kinsey Moore d8956f690e Rename everything Stasis-HTTP to ARI
This renames all files and API calls from several variants of
Stasis-HTTP to ARI including:
* Stasis-HTTP -> ARI
* STASIS_HTTP -> ARI
* stasis_http -> ari (ast_ari for global symbols, file names as well)
* stasis http -> ARI

Review: https://reviewboard.asterisk.org/r/2706/
(closes issue ASTERISK-22136)


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395603 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-07-27 23:11:02 +00:00