[asterisk-commits] dlee: branch dlee/json-lock r395956 - in /team/dlee/json-lock: include/asteri...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Aug 1 09:03:05 CDT 2013


Author: dlee
Date: Thu Aug  1 09:03:03 2013
New Revision: 395956

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=395956
Log:
Fixed ast_json_dump_string*() calls to free using ast_json_free

Modified:
    team/dlee/json-lock/include/asterisk/json.h
    team/dlee/json-lock/main/cel.c
    team/dlee/json-lock/res/ari/ari_websockets.c
    team/dlee/json-lock/res/res_sorcery_astdb.c

Modified: team/dlee/json-lock/include/asterisk/json.h
URL: http://svnview.digium.com/svn/asterisk/team/dlee/json-lock/include/asterisk/json.h?view=diff&rev=395956&r1=395955&r2=395956
==============================================================================
--- team/dlee/json-lock/include/asterisk/json.h (original)
+++ team/dlee/json-lock/include/asterisk/json.h Thu Aug  1 09:03:03 2013
@@ -728,13 +728,23 @@
 	AST_JSON_PRETTY,
 };
 
+/*!
+ * \brief Encode a JSON value to a compact string.
+ * \since 12.0.0
+ *
+ * Returned string must be freed by calling ast_json_free().
+ *
+ * \param root JSON value.
+ * \return String encoding of \a root.
+ * \return \c NULL on error.
+ */
 #define ast_json_dump_string(root) ast_json_dump_string_format(root, AST_JSON_COMPACT)
 
 /*!
  * \brief Encode a JSON value to a string.
  * \since 12.0.0
  *
- * Returned string must be freed by calling ast_free().
+ * Returned string must be freed by calling ast_json_free().
  *
  * \param root JSON value.
  * \param format encoding format type.

Modified: team/dlee/json-lock/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/json-lock/main/cel.c?view=diff&rev=395956&r1=395955&r2=395956
==============================================================================
--- team/dlee/json-lock/main/cel.c (original)
+++ team/dlee/json-lock/main/cel.c Thu Aug  1 09:03:03 2013
@@ -638,7 +638,7 @@
 		struct ast_json *extra, const char *peer_name)
 {
 	struct timeval eventtime = ast_tvnow();
-	RAII_VAR(char *, extra_txt, NULL, ast_free);
+	RAII_VAR(char *, extra_txt, NULL, ast_json_free);
 	if (extra) {
 		extra_txt = ast_json_dump_string(extra);
 	}

Modified: team/dlee/json-lock/res/ari/ari_websockets.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/json-lock/res/ari/ari_websockets.c?view=diff&rev=395956&r1=395955&r2=395956
==============================================================================
--- team/dlee/json-lock/res/ari/ari_websockets.c (original)
+++ team/dlee/json-lock/res/ari/ari_websockets.c Thu Aug  1 09:03:03 2013
@@ -142,7 +142,7 @@
 int ast_ari_websocket_session_write(struct ast_ari_websocket_session *session,
 	struct ast_json *message)
 {
-	RAII_VAR(char *, str, NULL, ast_free);
+	RAII_VAR(char *, str, NULL, ast_json_free);
 
 #ifdef AST_DEVMODE
 	if (!session->validator(message)) {

Modified: team/dlee/json-lock/res/res_sorcery_astdb.c
URL: http://svnview.digium.com/svn/asterisk/team/dlee/json-lock/res/res_sorcery_astdb.c?view=diff&rev=395956&r1=395955&r2=395956
==============================================================================
--- team/dlee/json-lock/res/res_sorcery_astdb.c (original)
+++ team/dlee/json-lock/res/res_sorcery_astdb.c Thu Aug  1 09:03:03 2013
@@ -126,7 +126,7 @@
 static int sorcery_astdb_create(const struct ast_sorcery *sorcery, void *data, void *object)
 {
 	RAII_VAR(struct ast_json *, objset, ast_sorcery_objectset_json_create(sorcery, object), ast_json_unref);
-	RAII_VAR(char *, value, NULL, ast_free_ptr);
+	RAII_VAR(char *, value, NULL, ast_json_free);
 	const char *prefix = data;
 	char family[strlen(prefix) + strlen(ast_sorcery_object_get_type(object)) + 2];
 




More information about the asterisk-commits mailing list