From c017d5e6a34fa7e8dc7ba089b5db2338f117c81b Mon Sep 17 00:00:00 2001 From: Richard Mudgett Date: Fri, 26 Jul 2013 21:34:23 +0000 Subject: 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 --- main/features.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'main/features.c') diff --git a/main/features.c b/main/features.c index 417f18c66..56e47fb91 100644 --- a/main/features.c +++ b/main/features.c @@ -1842,14 +1842,13 @@ struct dynamic_dtmf_hook_data { * \brief Activated dynamic DTMF feature hook. * \since 12.0.0 * - * \param bridge The bridge that the channel is part of * \param bridge_channel Channel executing the feature * \param hook_pvt Private data passed in when the hook was created * * \retval 0 Keep the callback hook. * \retval -1 Remove the callback hook. */ -static int dynamic_dtmf_hook_trip(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, void *hook_pvt) +static int dynamic_dtmf_hook_trip(struct ast_bridge_channel *bridge_channel, void *hook_pvt) { struct dynamic_dtmf_hook_data *pvt = hook_pvt; int (*run_it)(struct ast_bridge_channel *bridge_channel, ast_bridge_custom_callback_fn callback, const void *payload, size_t payload_size); -- cgit v1.2.3