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:
Richard Mudgett
2013-07-26 21:10:24 +00:00
parent b6f9b39830
commit 50aba6be36
5 changed files with 70 additions and 88 deletions

View File

@@ -237,8 +237,6 @@ struct ast_bridge_features {
struct ao2_container *other_hooks;
/*! Attached interval hooks */
struct ast_heap *interval_hooks;
/*! Limits feature data */
struct ast_bridge_features_limits *limits;
/*! Feature flags that are enabled */
struct ast_flags feature_flags;
/*! Used to assign the sequence number to the next interval hook added. */
@@ -298,13 +296,6 @@ struct ast_bridge_features_automixmonitor {
* \brief Structure that contains configuration information for the limits feature
*/
struct ast_bridge_features_limits {
/*! Maximum duration that the channel is allowed to be in the bridge (specified in milliseconds) */
unsigned int duration;
/*! Duration into the call when warnings should begin (specified in milliseconds or 0 to disable) */
unsigned int warning;
/*! Interval between the warnings (specified in milliseconds or 0 to disable) */
unsigned int frequency;
AST_DECLARE_STRING_FIELDS(
/*! Sound file to play when the maximum duration is reached (if empty, then nothing will be played) */
AST_STRING_FIELD(duration_sound);
@@ -315,6 +306,12 @@ struct ast_bridge_features_limits {
);
/*! Time when the bridge will be terminated by the limits feature */
struct timeval quitting_time;
/*! Maximum duration that the channel is allowed to be in the bridge (specified in milliseconds) */
unsigned int duration;
/*! Duration into the call when warnings should begin (specified in milliseconds or 0 to disable) */
unsigned int warning;
/*! Interval between the warnings (specified in milliseconds or 0 to disable) */
unsigned int frequency;
};
/*!