mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-13 16:21:01 +00:00
astobj2: Eliminate usage of legacy container allocation macros.
These macros have been documented as legacy for a long time but are still used in new code because they exist. Remove all references to: * ao2_container_alloc_options * ao2_t_container_alloc_options * ao2_t_container_alloc These macro's are still available for use but only in modules. Only ao2_container_alloc remains due to it's use in over 100 places. Change-Id: I1a26258b5bf3deb081aaeed11a0baa175c933c7a
This commit is contained in:
17
main/ccss.c
17
main/ccss.c
@@ -4649,14 +4649,19 @@ static int load_module(void)
|
||||
{
|
||||
int res;
|
||||
|
||||
if (!(cc_core_instances = ao2_t_container_alloc(CC_CORE_INSTANCES_BUCKETS,
|
||||
cc_core_instance_hash_fn, cc_core_instance_cmp_fn,
|
||||
"Create core instance container"))) {
|
||||
cc_core_instances = ao2_t_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0,
|
||||
CC_CORE_INSTANCES_BUCKETS,
|
||||
cc_core_instance_hash_fn, NULL, cc_core_instance_cmp_fn,
|
||||
"Create core instance container");
|
||||
if (!cc_core_instances) {
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
if (!(generic_monitors = ao2_t_container_alloc(CC_CORE_INSTANCES_BUCKETS,
|
||||
generic_monitor_instance_list_hash_fn, generic_monitor_instance_list_cmp_fn,
|
||||
"Create generic monitor container"))) {
|
||||
|
||||
generic_monitors = ao2_t_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0,
|
||||
CC_CORE_INSTANCES_BUCKETS,
|
||||
generic_monitor_instance_list_hash_fn, NULL, generic_monitor_instance_list_cmp_fn,
|
||||
"Create generic monitor container");
|
||||
if (!generic_monitors) {
|
||||
return AST_MODULE_LOAD_FAILURE;
|
||||
}
|
||||
if (!(cc_core_taskprocessor = ast_taskprocessor_get("CCSS_core", TPS_REF_DEFAULT))) {
|
||||
|
Reference in New Issue
Block a user