summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2013-05-29 03:22:04 +0000
committerMatthew Jordan <mjordan@digium.com>2013-05-29 03:22:04 +0000
commit071c1e290d5bf93a31d8c6ba2a7e08c634d9aac2 (patch)
tree925a955a485072d9a6f9846ea9c465e36db0c59b
parent6851801a5ebcb0fc7cdf20c14a68e96e67d7f96e (diff)
Pack the right number of items into the status and receive fax blobs
The code was still attempting to pack an additional item into the blobs that didn't exist. Crashes ensued. This patch modifies the publishing of these messages so that the correct number of items are packed in the JSON. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@389990 65c4cc65-6c06-0410-ace0-fbb531ad65f3
-rw-r--r--res/res_fax.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_fax.c b/res/res_fax.c
index 68cd0f272..4c53a0d7e 100644
--- a/res/res_fax.c
+++ b/res/res_fax.c
@@ -1184,7 +1184,7 @@ static int report_fax_status(struct ast_channel *chan, struct ast_fax_session_de
return -1;
}
- json_object = ast_json_pack("{s: s, s: s, s: s, s: s, s: s, s: o}",
+ json_object = ast_json_pack("{s: s, s: s, s: s, s: s, s: o}",
"type", "status",
"operation", (details->caps & AST_FAX_TECH_GATEWAY) ? "gateway" : (details->caps & AST_FAX_TECH_RECEIVE) ? "receive" : "send",
"status", status,
@@ -1777,7 +1777,7 @@ static int report_receive_fax_status(struct ast_channel *chan, const char *filen
{
SCOPED_CHANNELLOCK(lock, chan);
- json_object = ast_json_pack("s: s, s: s, s: s, s: s, s: s, s: s, s: s, s: o",
+ json_object = ast_json_pack("s: s, s: s, s: s, s: s, s: s, s: s, s: o",
"type", "receive"
"remote_station_id", S_OR(pbx_builtin_getvar_helper(chan, "REMOTESTATIONID"), ""),
"local_station_id", S_OR(pbx_builtin_getvar_helper(chan, "LOCALSTATIONID"), ""),