[asterisk-commits] mmichelson: branch mmichelson/transfer r386432 - /team/mmichelson/transfer/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 24 14:02:40 CDT 2013


Author: mmichelson
Date: Wed Apr 24 14:02:36 2013
New Revision: 386432

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386432
Log:
Remove unnecessary data and processing when blind transfering.

The transferer and transferee names are unimportant when performing
a single-channel blind transfer since the bridge action is performed
directly on the transferee's bridge_channel.


Modified:
    team/mmichelson/transfer/main/bridging.c

Modified: team/mmichelson/transfer/main/bridging.c
URL: http://svnview.digium.com/svn/asterisk/team/mmichelson/transfer/main/bridging.c?view=diff&rev=386432&r1=386431&r2=386432
==============================================================================
--- team/mmichelson/transfer/main/bridging.c (original)
+++ team/mmichelson/transfer/main/bridging.c Wed Apr 24 14:02:36 2013
@@ -1943,8 +1943,6 @@
  * just numbers pulled out of thin air.
  */
 struct blind_transfer_data {
-	char transferer_name[128];
-	char transferee_name[128];
 	char exten[AST_MAX_EXTENSION];
 	char context[AST_MAX_CONTEXT];
 };
@@ -1952,10 +1950,8 @@
 static void bridge_channel_blind_transfer(struct ast_bridge_channel *bridge_channel,
 		struct blind_transfer_data *blind_data)
 {
-	if (!strncmp(ast_channel_name(bridge_channel->chan), blind_data->transferee_name, sizeof(blind_data->transferee_name))) {
-		ast_async_goto(bridge_channel->chan, blind_data->context, blind_data->exten, 1);
-		ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
-	}
+	ast_async_goto(bridge_channel->chan, blind_data->context, blind_data->exten, 1);
+	ast_bridge_change_state(bridge_channel, AST_BRIDGE_CHANNEL_STATE_HANGUP);
 }
 
 /*!
@@ -4319,19 +4315,12 @@
 	RAII_VAR(struct ast_channel *, transferee, NULL, ao2_cleanup);
 	struct blind_transfer_data blind_data;
 
-	ast_channel_lock(transferer);
-	ast_copy_string(blind_data.transferer_name, ast_channel_name(transferer),
-			sizeof(blind_data.transferer_name));
-	ast_channel_unlock(transferer);
-
 	transferee = get_transferee(channels, transferer);
 	if (!transferee) {
 		return AST_BRIDGE_TRANSFER_FAIL;
 	}
 
 	ast_channel_lock(transferee);
-	ast_copy_string(blind_data.transferee_name, ast_channel_name(transferee),
-			sizeof(blind_data.transferee_name));
 	transferee_bridge_channel = ast_channel_internal_bridge_channel(transferee);
 	ao2_ref(transferee_bridge_channel, +1);
 	ast_channel_unlock(transferee);




More information about the asterisk-commits mailing list