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:
Corey Farrell
2018-10-16 15:11:06 -04:00
parent 221d01c32d
commit 687ab7aeee
20 changed files with 80 additions and 62 deletions

View File

@@ -194,7 +194,9 @@ static struct ast_srtp *res_srtp_new(void)
return NULL;
}
if (!(srtp->policies = ao2_t_container_alloc(5, policy_hash_fn, policy_cmp_fn, "SRTP policy container"))) {
srtp->policies = ao2_t_container_alloc_hash(AO2_ALLOC_OPT_LOCK_MUTEX, 0, 5,
policy_hash_fn, NULL, policy_cmp_fn, "SRTP policy container");
if (!srtp->policies) {
ast_free(srtp);
return NULL;
}