[Asterisk-code-review] json: Take advantage of new API's. (asterisk[master])

Corey Farrell asteriskteam at digium.com
Fri Sep 21 15:15:30 CDT 2018


Hello Richard Mudgett, Kevin Harwell, Jenkins2, Joshua Colp, 

I'd like you to reexamine a change. Please visit

    https://gerrit.asterisk.org/10193

to look at the new patch set (#2).

Change subject: json: Take advantage of new API's.
......................................................................

json: Take advantage of new API's.

* Use json_sprintf to implement ast_json_stringf and ast_json_vstringf.
* Use "o*" format specifier for optional fields in ast_json_party_id.
* Stop using ast_json_deep_copy on immutable objects, it is now thread
  safe to just use ast_json_ref.

Additional changes to ast_json_pack calls in the vicinity:
* Use "O" when an object needs to be bumped.  This was previously
  avoided as it was not thread safe.
* Use "o?" and "O?" to replace NULL with ast_json_null().  The
  "?" is a new feature of ast_json_pack starting with Asterisk 16.

Change-Id: I8382d28d7d83ee0ce13334e51ae45dbc0bdaef48
---
M main/json.c
M main/rtp_engine.c
M main/stasis.c
M res/res_stasis.c
M res/res_stasis_playback.c
M res/res_stasis_recording.c
6 files changed, 23 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/93/10193/2
-- 
To view, visit https://gerrit.asterisk.org/10193
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8382d28d7d83ee0ce13334e51ae45dbc0bdaef48
Gerrit-Change-Number: 10193
Gerrit-PatchSet: 2
Gerrit-Owner: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Jenkins2
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Kevin Harwell <kharwell at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180921/d5cc4a45/attachment-0001.html>


More information about the asterisk-code-review mailing list