[asterisk-commits] mmichelson: trunk r397923 - in /trunk: ./ apps/ main/
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Aug 29 10:43:25 CDT 2013
Author: mmichelson
Date: Thu Aug 29 10:43:23 2013
New Revision: 397923
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=397923
Log:
Multiple revisions 397921-397922
........
r397921 | mmichelson | 2013-08-29 10:42:10 -0500 (Thu, 29 Aug 2013) | 6 lines
Resolve assumptions that bridge snapshots would be non-NULL for transfer stasis events.
Attempting to transfer an unbridged call would result in crashes in either CEL code or
in the conversion to AMI messages.
........
r397922 | mmichelson | 2013-08-29 10:42:29 -0500 (Thu, 29 Aug 2013) | 3 lines
Remove extra debug message.
........
Merged revisions 397921-397922 from http://svn.asterisk.org/svn/asterisk/branches/12
Modified:
trunk/ (props changed)
trunk/apps/app_queue.c
trunk/main/cel.c
trunk/main/stasis_bridges.c
Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Thu Aug 29 10:43:23 2013
@@ -1,1 +1,1 @@
-/branches/12:1-397816,397854,397856,397859,397870,397874,397876,397885,397892,397894,397896,397898,397900,397902,397911
+/branches/12:1-397816,397854,397856,397859,397870,397874,397876,397885,397892,397894,397896,397898,397900,397902,397911,397921-397922
Modified: trunk/apps/app_queue.c
URL: http://svnview.digium.com/svn/asterisk/trunk/apps/app_queue.c?view=diff&rev=397923&r1=397922&r2=397923
==============================================================================
--- trunk/apps/app_queue.c (original)
+++ trunk/apps/app_queue.c Thu Aug 29 10:43:23 2013
@@ -5431,7 +5431,7 @@
return;
}
- if (ast_json_integer_get(result_blob) == AST_BRIDGE_TRANSFER_FAIL) {
+ if (ast_json_integer_get(result_blob) != AST_BRIDGE_TRANSFER_SUCCESS) {
return;
}
@@ -5490,7 +5490,7 @@
return;
}
- if (atxfer_msg->result == AST_BRIDGE_TRANSFER_FAIL ||
+ if (atxfer_msg->result != AST_BRIDGE_TRANSFER_SUCCESS ||
atxfer_msg->dest_type == AST_ATTENDED_TRANSFER_DEST_THREEWAY) {
return;
}
Modified: trunk/main/cel.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/cel.c?view=diff&rev=397923&r1=397922&r2=397923
==============================================================================
--- trunk/main/cel.c (original)
+++ trunk/main/cel.c Thu Aug 29 10:43:23 2013
@@ -1197,10 +1197,24 @@
struct ast_channel_snapshot *chan_snapshot = obj->channel;
struct ast_bridge_snapshot *bridge_snapshot = obj->bridge;
struct ast_json *blob = obj->blob;
- struct ast_json *json_exten = ast_json_object_get(blob, "exten");
- struct ast_json *json_context = ast_json_object_get(blob, "context");
+ struct ast_json *json_result = ast_json_object_get(blob, "result");
+ struct ast_json *json_exten;
+ struct ast_json *json_context;
RAII_VAR(struct ast_json *, extra, NULL, ast_json_unref);
const char *exten, *context;
+ enum ast_transfer_result result;
+
+ if (!json_result) {
+ return;
+ }
+
+ result = ast_json_integer_get(json_result);
+ if (result != AST_BRIDGE_TRANSFER_SUCCESS) {
+ return;
+ }
+
+ json_exten = ast_json_object_get(blob, "exten");
+ json_context = ast_json_object_get(blob, "context");
if (!json_exten || !json_context) {
return;
@@ -1211,6 +1225,7 @@
if (!exten || !context) {
return;
}
+
extra = ast_json_pack("{s: s, s: s, s: s}",
"extension", exten,
"context", context,
Modified: trunk/main/stasis_bridges.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/stasis_bridges.c?view=diff&rev=397923&r1=397922&r2=397923
==============================================================================
--- trunk/main/stasis_bridges.c (original)
+++ trunk/main/stasis_bridges.c Thu Aug 29 10:43:23 2013
@@ -585,9 +585,15 @@
}
channel_state = ast_manager_build_channel_state_string_prefix(blob->channel, "Transferer");
- bridge_state = ast_manager_build_bridge_state_string(blob->bridge);
- if (!channel_state || !bridge_state) {
- return NULL;
+ if (!channel_state) {
+ return NULL;
+ }
+
+ if (blob->bridge) {
+ bridge_state = ast_manager_build_bridge_state_string(blob->bridge);
+ if (!bridge_state) {
+ return NULL;
+ }
}
exten = ast_json_string_get(ast_json_object_get(blob->blob, "exten"));
@@ -604,7 +610,7 @@
"Extension: %s\r\n",
result_strs[result],
ast_str_buffer(channel_state),
- ast_str_buffer(bridge_state),
+ bridge_state ? ast_str_buffer(bridge_state) : "",
is_external ? "Yes" : "No",
context,
exten);
More information about the asterisk-commits
mailing list