]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
ast_json_pack(): Use safer json ref mechanism.
authorRichard Mudgett <rmudgett@digium.com>
Wed, 11 Nov 2015 23:20:38 +0000 (17:20 -0600)
committerRichard Mudgett <rmudgett@digium.com>
Tue, 19 Dec 2017 00:05:29 +0000 (18:05 -0600)
Change-Id: I49204db2e57ae96eee43909c18ed007c09ac817e

main/cel.c

index cec0a85e4931d4930c5f11c3e681c374215e25b4..24a35be7a94786f043c475fbef7f6730a1036b14 100644 (file)
@@ -1835,9 +1835,9 @@ void ast_cel_publish_event(struct ast_channel *chan,
        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) {