summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2013-07-26 21:34:23 +0000
committerRichard Mudgett <rmudgett@digium.com>2013-07-26 21:34:23 +0000
commitc017d5e6a34fa7e8dc7ba089b5db2338f117c81b (patch)
treed111b5985f3985ab02a462d4b48467b537163b70 /apps
parent50aba6be3654e348960a3bda2312f7a913f5c160 (diff)
Remove the unsafe bridge parameter from ast_bridge_hook_callback's.
Most hook callbacks did not need the bridge parameter. The pointer value could become invalid if the channel is moved to another bridge while it is executing. * Fixed some issues in feature_attended_transfer() as a result. * Reduce the bridge inhibit count in attended_transfer_properties_shutdown() after it has restored the bridge channel hooks. * Removed basic bridge requirement on feature_blind_transfer(). It does not require the basic bridge like feature_attended_transfer(). git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395574 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps')
-rw-r--r--apps/app_agent_pool.c9
-rw-r--r--apps/app_bridgewait.c2
-rw-r--r--apps/app_confbridge.c4
-rw-r--r--apps/confbridge/conf_config_parser.c3
4 files changed, 9 insertions, 9 deletions
diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c
index 6ed2ccad1..6beb90a95 100644
--- a/apps/app_agent_pool.c
+++ b/apps/app_agent_pool.c
@@ -1078,12 +1078,11 @@ static void agent_connect_caller(struct ast_bridge_channel *bridge_channel, stru
* The agent is in the new bridge so we can invoke the
* mixmonitor hook to only start recording.
*/
- ast_bridge_features_do(AST_BRIDGE_BUILTIN_AUTOMIXMON, caller_bridge,
- bridge_channel, &options);
+ ast_bridge_features_do(AST_BRIDGE_BUILTIN_AUTOMIXMON, bridge_channel, &options);
}
}
-static int bridge_agent_hold_ack(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
+static int bridge_agent_hold_ack(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
struct agent_pvt *agent = hook_pvt;
@@ -1101,7 +1100,7 @@ static int bridge_agent_hold_ack(struct ast_bridge *bridge, struct ast_bridge_ch
return 0;
}
-static int bridge_agent_hold_heartbeat(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
+static int bridge_agent_hold_heartbeat(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
struct agent_pvt *agent = hook_pvt;
int probation_timedout = 0;
@@ -1709,7 +1708,7 @@ static void caller_abort_agent(struct agent_pvt *agent)
ast_bridge_channel_unlock(logged);
}
-static int caller_safety_timeout(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
+static int caller_safety_timeout(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
struct agent_pvt *agent = hook_pvt;
diff --git a/apps/app_bridgewait.c b/apps/app_bridgewait.c
index bdfd87e62..5697a79d0 100644
--- a/apps/app_bridgewait.c
+++ b/apps/app_bridgewait.c
@@ -201,7 +201,7 @@ AST_APP_OPTIONS(bridgewait_opts, {
AST_APP_OPTION_ARG('S', MUXFLAG_TIMEOUT, OPT_ARG_TIMEOUT),
});
-static int bridgewait_timeout_callback(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
+static int bridgewait_timeout_callback(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
ast_verb(3, "Channel %s timed out.\n", ast_channel_name(bridge_channel->chan));
ast_bridge_channel_leave_bridge(bridge_channel, BRIDGE_CHANNEL_STATE_END);
diff --git a/apps/app_confbridge.c b/apps/app_confbridge.c
index 3b58a4d86..01060976d 100644
--- a/apps/app_confbridge.c
+++ b/apps/app_confbridge.c
@@ -1402,9 +1402,9 @@ static void conf_handle_talker_destructor(void *pvt_data)
ast_free(pvt_data);
}
-static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *pvt_data, int talking)
+static int conf_handle_talker_cb(struct ast_bridge_channel *bridge_channel, void *hook_pvt, int talking)
{
- const char *conf_name = pvt_data;
+ const char *conf_name = hook_pvt;
struct confbridge_conference *conference = ao2_find(conference_bridges, conf_name, OBJ_KEY);
struct ast_json *talking_extras;
diff --git a/apps/confbridge/conf_config_parser.c b/apps/confbridge/conf_config_parser.c
index 58431ca3c..984787cb2 100644
--- a/apps/confbridge/conf_config_parser.c
+++ b/apps/confbridge/conf_config_parser.c
@@ -2080,9 +2080,10 @@ static void menu_hook_destroy(void *hook_pvt)
ast_free(pvt);
}
-static int menu_hook_callback(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt)
+static int menu_hook_callback(struct ast_bridge_channel *bridge_channel, void *hook_pvt)
{
struct dtmf_menu_hook_pvt *pvt = hook_pvt;
+
return conf_handle_dtmf(bridge_channel, pvt->user, &pvt->menu_entry, pvt->menu);
}