[Asterisk-code-review] ast json pack(): Use safer json ref mechanism. (asterisk[13])

Richard Mudgett asteriskteam at digium.com
Mon Dec 18 18:05:33 CST 2017


Richard Mudgett has uploaded this change for review. ( https://gerrit.asterisk.org/7637


Change subject: ast_json_pack(): Use safer json ref mechanism.
......................................................................

ast_json_pack(): Use safer json ref mechanism.

Change-Id: I49204db2e57ae96eee43909c18ed007c09ac817e
---
M main/cel.c
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/37/7637/1

diff --git a/main/cel.c b/main/cel.c
index d46f185..24d7faa 100644
--- a/main/cel.c
+++ b/main/cel.c
@@ -1837,9 +1837,9 @@
 	struct ast_json *cel_blob;
 	struct stasis_message *message;
 
-	cel_blob = ast_json_pack("{s: i, s: O}",
+	cel_blob = ast_json_pack("{s: i, s: o}",
 		"event_type", event_type,
-		"event_details", blob);
+		"event_details", ast_json_ref(blob));
 
 	message = ast_channel_blob_create_from_cache(ast_channel_uniqueid(chan), cel_generic_type(), cel_blob);
 	if (message) {

-- 
To view, visit https://gerrit.asterisk.org/7637
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: I49204db2e57ae96eee43909c18ed007c09ac817e
Gerrit-Change-Number: 7637
Gerrit-PatchSet: 1
Gerrit-Owner: Richard Mudgett <rmudgett at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20171218/a5dea9bf/attachment-0001.html>


More information about the asterisk-code-review mailing list