diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-07-26 21:10:24 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-07-26 21:10:24 +0000 |
commit | 50aba6be3654e348960a3bda2312f7a913f5c160 (patch) | |
tree | ec7ae8a644b488d2891e9919c0bf7d2ee43fcd2e /res | |
parent | b6f9b398308865fcb2c42995d4277e10ab9518e7 (diff) |
Improved feature limits interval hook implementaion.
* Fixed feature limits to not use special members of struct
ast_bridge_features.
* Fixed memory leak in off nominal paths of bridge_builtin_set_limits().
* Fixed off nominal path in ast_bridge_features_limits_construct() freeing
unallocated memory if it was not called by bridge_builtin_set_limits().
* Made bridge_builtin_interval_features.so unloadable.
* Simplified parking's use of its duration interval hook.
* Made BridgeWait S option not depend upon another module being loaded.
(closes issue ASTERISK-22107)
Reported by: Matt Jordan
Review: https://reviewboard.asterisk.org/r/2701/
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@395559 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res')
-rw-r--r-- | res/parking/parking_bridge_features.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/res/parking/parking_bridge_features.c b/res/parking/parking_bridge_features.c index 1b57f9c07..1d9e3dada 100644 --- a/res/parking/parking_bridge_features.c +++ b/res/parking/parking_bridge_features.c @@ -363,12 +363,6 @@ static int feature_park(struct ast_bridge *bridge, struct ast_bridge_channel *br return 0; } -static void parking_duration_cb_destroyer(void *hook_pvt) -{ - struct parked_user *user = hook_pvt; - ao2_ref(user, -1); -} - /*! \internal * \brief Interval hook. Pulls a parked call from the parking bridge after the timeout is passed and sets the resolution to timeout. * @@ -523,7 +517,7 @@ void parking_set_duration(struct ast_bridge_features *features, struct parked_us ao2_ref(user, +1); if (ast_bridge_interval_hook(features, time_limit, - parking_duration_callback, user, parking_duration_cb_destroyer, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) { + parking_duration_callback, user, __ao2_cleanup, AST_BRIDGE_HOOK_REMOVE_ON_PULL)) { ast_log(LOG_ERROR, "Failed to apply duration limits to the parking call.\n"); ao2_ref(user, -1); } |