Make chan_local locals container an explicit list container.

Pretending that chan_local locals container can have more than one bucket
is silly.  The container has no key to help search.


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@387211 65c4cc65-6c06-0410-ace0-fbb531ad65f3
changes/78/78/1
Richard Mudgett 12 years ago
parent 3992df6d41
commit e6f7de360d

@ -78,11 +78,6 @@ static const char tdesc[] = "Local Proxy Channel Driver";
#define IS_OUTBOUND(a,b) (a == b->chan ? 1 : 0)
/* right now we are treating the locals astobj2 container as a
* list. If there is ever a reason to make this more efficient
* increasing the bucket size would help. */
static const int BUCKET_SIZE = 1;
static struct ao2_container *locals;
static unsigned int name_sequence = 0;
@ -1429,7 +1424,8 @@ static int load_module(void)
}
ast_format_cap_add_all(local_tech.capabilities);
if (!(locals = ao2_container_alloc(BUCKET_SIZE, NULL, locals_cmp_cb))) {
locals = ao2_container_alloc_list(AO2_ALLOC_OPT_LOCK_MUTEX, 0, NULL, locals_cmp_cb);
if (!locals) {
ast_format_cap_destroy(local_tech.capabilities);
return AST_MODULE_LOAD_FAILURE;
}

Loading…
Cancel
Save