mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-22 20:56:39 +00:00
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
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user