diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-05-24 20:44:07 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-05-24 20:44:07 +0000 |
commit | 06be8463b683333c79845402d55168ef1b582fa9 (patch) | |
tree | 2fe0871cfec4d5edf3aae763541ff7efa32a444a /main/json.c | |
parent | c1b51fd2654736fd7c614d1571f904e236006651 (diff) |
Migrate a large number of AMI events over to Stasis-Core
This patch moves a number of AMI events over to the Stasis-Core message bus.
This includes:
* ChanSpyStart/Stop
* MonitorStart/Stop
* MusicOnHoldStart/Stop
* FullyBooted/Reload
* All Voicemail/MWI related events
In addition, it adds some Stasis-Core and AMI support for generic AMI messages,
refactors the message router in AMI to use a single router with topic
forwarding for the topics that AMI cares about, and refactors MWI message
types and topics to be more name compliant.
Review: https://reviewboard.asterisk.org/r/2532
(closes issue ASTERISK-21462)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389733 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/json.c')
-rw-r--r-- | main/json.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/json.c b/main/json.c index 5b69ccbaa..70830bd13 100644 --- a/main/json.c +++ b/main/json.c @@ -78,6 +78,9 @@ struct ast_json *ast_json_ref(struct ast_json *json) void ast_json_unref(struct ast_json *json) { + if (!json) { + return; + } json_decref((json_t *)json); } @@ -327,6 +330,10 @@ const char *ast_json_object_iter_key(struct ast_json_iter *iter) { return json_object_iter_key(iter); } +struct ast_json_iter *ast_json_object_key_to_iter(const char *key) +{ + return (struct ast_json_iter *)json_object_key_to_iter(key); +} struct ast_json *ast_json_object_iter_value(struct ast_json_iter *iter) { return (struct ast_json *)json_object_iter_value(iter); |