-
- Downloads
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
Showing
- include/asterisk/json.h 56 additions, 1 deletioninclude/asterisk/json.h
- main/cel.c 1 addition, 1 deletionmain/cel.c
- main/json.c 175 additions, 11 deletionsmain/json.c
- res/ari/ari_websockets.c 1 addition, 1 deletionres/ari/ari_websockets.c
- res/res_sorcery_astdb.c 1 addition, 1 deletionres/res_sorcery_astdb.c
- tests/test_json.c 2 additions, 2 deletionstests/test_json.c
Loading
Please register or sign in to comment