diff options
author | Richard Mudgett <rmudgett@digium.com> | 2014-02-21 18:04:54 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2014-02-21 18:04:54 +0000 |
commit | d277f3ec3ee7a7a38971f5da56bd79347ac6bf9a (patch) | |
tree | 500ce6ebba19b01725cdcda97108cdbb8b5fb557 /include | |
parent | eec8ccc10b9c88e0afb4504ed9a6074da06caaa9 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/asterisk/json.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/include/asterisk/json.h b/include/asterisk/json.h index 15e1108da..6ceeb0b86 100644 --- a/include/asterisk/json.h +++ b/include/asterisk/json.h @@ -443,8 +443,8 @@ struct ast_json *ast_json_array_get(const struct ast_json *array, size_t index); * \brief Change an element in an array. * \since 12.0.0 * - * The \a array steals the \a value reference; use ast_json_ref() to safely keep a pointer - * to it. + * \note The \a array steals the \a value reference even if it returns error; + * use ast_json_ref() to safely keep a pointer to it. * * \param array JSON array to modify. * \param index Zero-based index into array. @@ -458,8 +458,8 @@ int ast_json_array_set(struct ast_json *array, size_t index, struct ast_json *va * \brief Append to an array. * \since 12.0.0 * - * The array steals the \a value reference; use ast_json_ref() to safely keep a pointer - * to it. + * \note The \a array steals the \a value reference even if it returns error; + * use ast_json_ref() to safely keep a pointer to it. * * \param array JSON array to modify. * \param value New JSON value to store at the end of \a array. @@ -472,8 +472,8 @@ int ast_json_array_append(struct ast_json *array, struct ast_json *value); * \brief Insert into an array. * \since 12.0.0 * - * The array steals the \a value reference; use ast_json_ref() to safely keep a pointer - * to it. + * \note The \a array steals the \a value reference even if it returns error; + * use ast_json_ref() to safely keep a pointer to it. * * \param array JSON array to modify. * \param index Zero-based index into array. @@ -554,8 +554,8 @@ struct ast_json *ast_json_object_get(struct ast_json *object, const char *key); * \brief Set a field in a JSON object. * \since 12.0.0 * - * The object steals the \a value reference; use ast_json_ref() to safely keep a pointer - * to it. + * \note The object steals the \a value reference even if it returns error; + * use ast_json_ref() to safely keep a pointer to it. * * \param object JSON object to modify. * \param key Key of field to set. @@ -701,8 +701,8 @@ struct ast_json *ast_json_object_iter_value(struct ast_json_iter *iter); * \brief Set the value of the field pointed to by an iterator. * \since 12.0.0 * - * The array steals the value reference; use ast_json_ref() to safely keep a - * pointer to it. + * \note The object steals the \a value reference even if it returns error; + * use ast_json_ref() to safely keep a pointer to it. * * \param object JSON object \a iter was obtained from. * \param iter JSON object iterator. |