From cc29957a6f3339667f02a7386416c7374122d403 Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Sun, 23 Jun 2013 19:19:30 +0000 Subject: [PATCH] Properly pack the parameters into ast_json_pack when sending a send fax message This patch properly packs the parameters into the send fax message so that it actually work. Missing a ',' between two string fields can be difficult to debug, particularly when the actual packing succeeds. Interestingly enough, this didn't actually crash until the JSON blob we deref'd and disposed of. Since that happened in a different thread, it was pretty tough to track down. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@392676 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_fax.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/res/res_fax.c b/res/res_fax.c index 40a43189c6..6341a55ff1 100644 --- a/res/res_fax.c +++ b/res/res_fax.c @@ -2308,9 +2308,8 @@ static int report_send_fax_status(struct ast_channel *chan, struct ast_fax_sessi if (!ast_strlen_zero(fax_bitrate)) { fax_bitrate = ast_strdupa(fax_bitrate); } - json_obj = ast_json_pack("{s: s, s: s, s: s, s: s, s: s, s: s, s: o}", - "type", "send" + "type", "send", "remote_station_id", S_OR(remote_station_id, ""), "local_station_id", S_OR(local_station_id, ""), "fax_pages", S_OR(fax_pages, ""),