[svn-commits] mjordan: trunk r391314 - /trunk/main/loader.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Jun 10 17:38:06 CDT 2013
Author: mjordan
Date: Mon Jun 10 17:38:04 2013
New Revision: 391314
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=391314
Log:
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.
Modified:
trunk/main/loader.c
Modified: trunk/main/loader.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/loader.c?view=diff&rev=391314&r1=391313&r2=391314
==============================================================================
--- trunk/main/loader.c (original)
+++ trunk/main/loader.c Mon Jun 10 17:38:04 2013
@@ -750,7 +750,7 @@
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);
More information about the svn-commits
mailing list