From 13e75ee04fae19528be83093a7dc6bb4ff600aa2 Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 18 Mar 2016 14:01:02 -0500 Subject: res_parking: Misc fixes. res/parking/parking_applications.c: * Add malloc fail checks in setup_park_common_datastore(). * Fix playing parking failed announcement to only happen on non-blind transfers in park_app_exec(). It could never go out before because a test was provedly always false. res/parking/parking_bridge.c: * Fix NULL tolerance in generate_parked_user() because bridge_parking_push() can theoretically pass a NULL parker channel if the parker channel went away for some reason. * Clarify some weird code dealing with blind_transfer in bridge_parking_push(). res/parking/parking_bridge_features.c: * Made park_local_transfer() set BLINDTRANSFER on the Local;1 channel which will be bulk copied to the Local;2 channel on the subsequent ast_call(). The additional advantage is if the parker channel has the BLINDTRANSFER and ATTENDEDTRANSFER variables set they are now guaranteed to be overridden. res/parking/parking_manager.c: * Fix AMI Park action input range checking of the Timeout header in manager_park(). * Reduced locking scope to where needed in manager_park(). res/res_parking.c: * Fix some off nominal missing unlocks by eliminating the returns. Change-Id: Ib64945bc285acb05a306dc12e6f16854898915ca --- res/parking/parking_bridge_features.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'res/parking/parking_bridge_features.c') diff --git a/res/parking/parking_bridge_features.c b/res/parking/parking_bridge_features.c index 4cb87c81a..70c2fc6db 100644 --- a/res/parking/parking_bridge_features.c +++ b/res/parking/parking_bridge_features.c @@ -238,6 +238,7 @@ static struct ast_channel *park_local_transfer(struct ast_channel *parker, const ast_channel_req_accountcodes(parkee, parker, AST_CHANNEL_REQUESTOR_REPLACEMENT); ast_connected_line_copy_from_caller(ast_channel_connected(parkee), ast_channel_caller(parker)); ast_channel_inherit_variables(parker, parkee); + ast_bridge_set_transfer_variables(parkee, ast_channel_name(parker), 0); ast_channel_datastore_inherit(parker, parkee); ast_channel_unlock(parker); @@ -252,8 +253,6 @@ static struct ast_channel *park_local_transfer(struct ast_channel *parker, const return NULL; } - ast_bridge_set_transfer_variables(parkee_side_2, ast_channel_name(parker), 0); - ast_channel_unref(parkee_side_2); /* Since the above worked fine now we actually call it and return the channel */ -- cgit v1.2.3