Commit Graph

8 Commits

Author SHA1 Message Date
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 d277f3ec3e json: Fix off-nominal json ref counting issues.
* Fixed off-nominal json ref counting issue with using the following API
calls: ast_json_object_set() and ast_json_array_append().

* Fixed off-nominal error reporting in ast_ari_endpoints_list().

* Fixed some miscellaneous off-nominal json ref counting issues in
report_receive_fax_status() and dial_to_json().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408714 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-21 18:04:54 +00:00
Richard Mudgett 61a4a98ed9 res_sorcery_astdb.c: Fix regex handling and keep simple prefix matching performance.
The sorcery astDB wizzard does not handle regex correctly if the pattern
begins with an anchor character.

This patch attempts to convert the anchored regex pattern to a prefix
pattern supported by astDB for performance reasons.  If it is not able to
convert the pattern it falls back to getting all astDB members of the
family and doing a normal regex pattern matching on the retrieved records.

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

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@408386 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2014-02-19 18:29:12 +00:00
Richard Mudgett c91d4d12de Reverting regex part of -r403545 at request of file.
res_sorcery_astdb.c: Fix get multiple records by regex.

* Fix sorcery_astdb_retrieve_regex() pattern matching.  Let the regexec()
function match the stored key values instead of having astdb prefilter
them.  Previoiusly you could only use a simple regex pattern when the
pattern began with '^'.
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403560 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 19:24:58 +00:00
Richard Mudgett 31d51d373b res_sorcery_astdb.c: Fix get multiple records by regex.
* Fix sorcery_astdb_retrieve_regex() pattern matching.  Let the regexec()
function match the stored key values instead of having astdb prefilter
them.  Previoiusly you could only use a simple regex pattern when the
pattern began with '^'.

* Fix off nominal memory leak in sorcery_astdb_retrieve_regex().
........

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@403546 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-12-09 18:50:20 +00:00
David M. Lee 10c91bc96e Address JSON thread safety issues.
In tracking down some unit tests failures, I ended up reading the fine
print[1] regarding Jansson's thread safety.

In short:
 1. Ref-counting is non-atomic.
 2. json_dumps() and friends are not thread safe.

This patch adds locking where necessary to our ast_json_* wrapper API,
with documentation in json.h describing the thread safety limitations of
the API.

 [1]: http://www.digip.org/jansson/doc/2.4/portability.html#thread-safety

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396119 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-08-02 14:27:35 +00:00
Joshua Colp 40074542bf Add support for observers and JSON objectset creation to sorcery.
This change adds the ability for modules to add themselves as observers
to sorcery object types. Observers can be notified when objects are
created, updated, or deleted as well as when the object type is loaded or
reloaded. Observer notifications are done using a thread pool in a serialized
fashion so the caller of the sorcery API calls is minimally impacted.

This also adds the ability to create JSON changesets of a sorcery object.

Tests are also present to confirm all of the above functionality.

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


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387662 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-05-06 13:04:08 +00:00
Joshua Colp 426095bc55 Add a res_sorcery_astdb module which uses the astdb to persist objects.
Review: https://reviewboard.asterisk.org/r/2420/


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@384857 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-06 16:00:20 +00:00