mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 03:20:57 +00:00
astobj2: Eliminate 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 also removed. Only ao2_container_alloc remains due to it's use in over 100 places. Change-Id: I1a26258b5bf3deb081aaeed11a0baa175c933c7a
This commit is contained in:
@@ -649,8 +649,8 @@ static void *bucket_file_alloc(const char *name)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
file->metadata = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_NOLOCK, METADATA_BUCKETS,
|
||||
ast_bucket_metadata_hash_fn, ast_bucket_metadata_cmp_fn);
|
||||
file->metadata = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_NOLOCK, 0, METADATA_BUCKETS,
|
||||
ast_bucket_metadata_hash_fn, NULL, ast_bucket_metadata_cmp_fn);
|
||||
if (!file->metadata) {
|
||||
return NULL;
|
||||
}
|
||||
@@ -954,8 +954,8 @@ int ast_bucket_init(void)
|
||||
{
|
||||
ast_register_cleanup(&bucket_cleanup);
|
||||
|
||||
schemes = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK, SCHEME_BUCKETS,
|
||||
ast_bucket_scheme_hash_fn, ast_bucket_scheme_cmp_fn);
|
||||
schemes = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_RWLOCK, 0, SCHEME_BUCKETS,
|
||||
ast_bucket_scheme_hash_fn, NULL, ast_bucket_scheme_cmp_fn);
|
||||
if (!schemes) {
|
||||
ast_log(LOG_ERROR, "Failed to create container for Bucket schemes\n");
|
||||
return -1;
|
||||
|
Reference in New Issue
Block a user