mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Fix a variety of memory corruption/assertion errors
* Initialize a Stasis-Core message type prior to initializing a caching topic. The caching topic will attempt to use the message type. * Don't attempt to publish Stasis-Core messages from remote console connections. They aren't the main process; they shouldn't attempt to behave as it (they also don't have the infrastructure to do so) * Don't treat a JSON object as an ao2 object (whoops) * In asterisk.c, ref bump the JSON even package that is distributed with the event meta data. The callers assume that they own the reference, and the packing routine steals references. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389785 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -2246,7 +2246,7 @@ static int sendfax_t38_init(struct ast_channel *chan, struct ast_fax_session_det
|
||||
*/
|
||||
static int report_send_fax_status(struct ast_channel *chan, struct ast_fax_session_details *details)
|
||||
{
|
||||
RAII_VAR(struct ast_json *, json_obj, NULL, ao2_cleanup);
|
||||
RAII_VAR(struct ast_json *, json_obj, NULL, ast_json_unref);
|
||||
RAII_VAR(struct stasis_message *, message, NULL, ao2_cleanup);
|
||||
struct ast_json *json_filenames;
|
||||
|
||||
@@ -2257,7 +2257,7 @@ static int report_send_fax_status(struct ast_channel *chan, struct ast_fax_sessi
|
||||
|
||||
{
|
||||
SCOPED_CHANNELLOCK(lock, chan);
|
||||
json_obj = ast_json_pack("{s: s, s: s, s: s, s: s, s: s, s: s, s: s, s: o}",
|
||||
json_obj = ast_json_pack("{s: s, s: s, s: s, s: s, s: s, s: s, s: o}",
|
||||
"type", "send"
|
||||
"remote_station_id", S_OR(pbx_builtin_getvar_helper(chan, "REMOTESTATIONID"), ""),
|
||||
"local_station_id", S_OR(pbx_builtin_getvar_helper(chan, "LOCALSTATIONID"), ""),
|
||||
|
Reference in New Issue
Block a user