[asterisk-commits] jrose: branch jrose/bridge_projects r386459 - in /team/jrose/bridge_projects:...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Apr 24 16:11:39 CDT 2013


Author: jrose
Date: Wed Apr 24 16:11:36 2013
New Revision: 386459

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=386459
Log:
use extension instead of extension app_data for ast_park_blind_xfer

Modified:
    team/jrose/bridge_projects/bridges/bridge_builtin_features.c
    team/jrose/bridge_projects/include/asterisk/parking.h
    team/jrose/bridge_projects/main/parking.c
    team/jrose/bridge_projects/res/parking/parking_bridge_features.c

Modified: team/jrose/bridge_projects/bridges/bridge_builtin_features.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/bridges/bridge_builtin_features.c?view=diff&rev=386459&r1=386458&r2=386459
==============================================================================
--- team/jrose/bridge_projects/bridges/bridge_builtin_features.c (original)
+++ team/jrose/bridge_projects/bridges/bridge_builtin_features.c Wed Apr 24 16:11:36 2013
@@ -188,7 +188,7 @@
 	park_exten = ast_get_parking_exten(exten, bridge_channel->chan, context);
 	if (park_exten) {
 		/* We are transfering the transferee to a parking lot. */
-		if (ast_park_blind_xfer(bridge, bridge_channel, ast_get_extension_app_data(park_exten))) {
+		if (ast_park_blind_xfer(bridge, bridge_channel, park_exten)) {
 			ast_log(LOG_ERROR, "%s attempted to transfer to park application and failed.\n", ast_channel_name(bridge_channel->chan));
 		};
 		return 0;

Modified: team/jrose/bridge_projects/include/asterisk/parking.h
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/include/asterisk/parking.h?view=diff&rev=386459&r1=386458&r2=386459
==============================================================================
--- team/jrose/bridge_projects/include/asterisk/parking.h (original)
+++ team/jrose/bridge_projects/include/asterisk/parking.h Wed Apr 24 16:11:36 2013
@@ -128,7 +128,7 @@
  * \param parking_func Function to use for transfers to 'Park' applications
  */
 void ast_install_park_blind_xfer_func(int (*park_blind_xfer_func)(struct ast_bridge *bridge, struct ast_bridge_channel *parker,
-		const char *app_data));
+		struct ast_exten *park_exten));
 
 /*!
  * \brief uninstall a callback for handling blind transfers to a parking extension
@@ -148,7 +148,7 @@
  * \retval -1 on failure
  */
 int ast_park_blind_xfer(struct ast_bridge *bridge, struct ast_bridge_channel *parker,
-		const char *app_data);
+		struct ast_exten *park_exten);
 
 /*!
  * \brief Install a function for ast_bridge_channel_park

Modified: team/jrose/bridge_projects/main/parking.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/main/parking.c?view=diff&rev=386459&r1=386458&r2=386459
==============================================================================
--- team/jrose/bridge_projects/main/parking.c (original)
+++ team/jrose/bridge_projects/main/parking.c Wed Apr 24 16:11:36 2013
@@ -42,7 +42,7 @@
 
 /*! \brief Function Callback for handling blind transfers to park applications */
 static int (*ast_park_blind_xfer_func)(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel,
-		const char *app_data) = NULL;
+		struct ast_exten *park_exten) = NULL;
 
 /*! \brief Function Callback for handling a bridge channel trying to park itself */
 static void (*ast_bridge_channel_park_func)(struct ast_bridge_channel *parkee, const char *parkee_uuid,
@@ -128,7 +128,7 @@
 }
 
 void ast_install_park_blind_xfer_func(int (*park_blind_xfer_func)(struct ast_bridge *bridge, struct ast_bridge_channel *parker,
-	const char *app_data))
+	struct ast_exten *park_exten))
 {
 	ast_park_blind_xfer_func = park_blind_xfer_func;
 }
@@ -150,11 +150,11 @@
 }
 
 int ast_park_blind_xfer(struct ast_bridge *bridge, struct ast_bridge_channel *parker,
-		const char *app_data)
+		struct ast_exten *park_exten)
 {
 	static int warned = 0;
 	if (ast_park_blind_xfer_func) {
-		return ast_park_blind_xfer_func(bridge, parker, app_data);
+		return ast_park_blind_xfer_func(bridge, parker, park_exten);
 	}
 
 	if (warned++ % 10 == 0) {

Modified: team/jrose/bridge_projects/res/parking/parking_bridge_features.c
URL: http://svnview.digium.com/svn/asterisk/team/jrose/bridge_projects/res/parking/parking_bridge_features.c?view=diff&rev=386459&r1=386458&r2=386459
==============================================================================
--- team/jrose/bridge_projects/res/parking/parking_bridge_features.c (original)
+++ team/jrose/bridge_projects/res/parking/parking_bridge_features.c Wed Apr 24 16:11:36 2013
@@ -31,6 +31,7 @@
 #include "asterisk/utils.h"
 #include "asterisk/astobj2.h"
 #include "asterisk/logger.h"
+#include "asterisk/pbx.h"
 #include "asterisk/bridging.h"
 #include "asterisk/bridging_features.h"
 #include "asterisk/features.h"
@@ -192,7 +193,7 @@
 	return 0;
 }
 
-static int park_feature_helper(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, const char *app_data)
+static int park_feature_helper(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_exten *park_exten)
 {
 	RAII_VAR(struct ast_channel *, other, NULL, ao2_cleanup);
 	RAII_VAR(struct parking_lot *, lot, NULL, ao2_cleanup);
@@ -231,7 +232,7 @@
 	}
 
 	/* Write the park frame with the intended recipient and other data out to the bridge. */
-	ast_bridge_channel_write_park(bridge_channel, ast_channel_uniqueid(other), ast_channel_uniqueid(bridge_channel->chan), app_data);
+	ast_bridge_channel_write_park(bridge_channel, ast_channel_uniqueid(other), ast_channel_uniqueid(bridge_channel->chan), ast_get_extension_app_data(park_exten));
 
 	return 0;
 }




More information about the asterisk-commits mailing list