Skip to content
Snippets Groups Projects
Commit ed85661f authored by Matthew Jordan's avatar Matthew Jordan
Browse files

Make the reload stasis message bump the ref count of its sub-object

JSON objects are reference stealing. Hence, if you've RAII_VAR'd some
subobject and want to pack it into another JSON object, you have to bump
the reference count. Using the 'O' option during the pack will bump the
reference count for you.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@391314 65c4cc65-6c06-0410-ace0-fbb531ad65f3
parent 75e7c3a8
No related branches found
No related tags found
No related merge requests found
......@@ -750,7 +750,7 @@ static void publish_reload_message(const char *name, enum ast_module_reload_resu
event_object = ast_json_pack("{s: s, s: s}",
"Module", S_OR(name, "All"),
"Status", res_buffer);
json_object = ast_json_pack("{s: s, s: i, s: o}",
json_object = ast_json_pack("{s: s, s: i, s: O}",
"type", "Reload",
"class_type", EVENT_FLAG_SYSTEM,
"event", event_object);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment