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:
Corey Farrell
2018-10-16 15:06:15 -04:00
parent 14d1e6ca2a
commit dee1165d31
20 changed files with 86 additions and 54 deletions

View File

@@ -2005,7 +2005,9 @@ static int load_module(void)
{
int res;
if (!(mohclasses = ao2_t_container_alloc(53, moh_class_hash, moh_class_cmp, "Moh class container"))) {
mohclasses = ao2_t_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0, 53,
moh_class_hash, NULL, moh_class_cmp, "Moh class container");
if (!mohclasses) {
return AST_MODULE_LOAD_DECLINE;
}