mirror of
https://github.com/asterisk/asterisk.git
synced 2025-10-03 11:11:05 +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:
@@ -1556,9 +1556,9 @@ static void *sorcery_memory_cache_open(const char *data)
|
||||
}
|
||||
}
|
||||
|
||||
cache->objects = ao2_container_alloc_options(AO2_ALLOC_OPT_LOCK_RWLOCK,
|
||||
cache->objects = ao2_container_alloc_hash(AO2_ALLOC_OPT_LOCK_RWLOCK, 0,
|
||||
cache->maximum_objects ? cache->maximum_objects : CACHE_CONTAINER_BUCKET_SIZE,
|
||||
sorcery_memory_cached_object_hash, sorcery_memory_cached_object_cmp);
|
||||
sorcery_memory_cached_object_hash, NULL, sorcery_memory_cached_object_cmp);
|
||||
if (!cache->objects) {
|
||||
ast_log(LOG_ERROR, "Could not create a container to hold cached objects for memory cache\n");
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user