diff options
author | Richard Mudgett <rmudgett@digium.com> | 2013-05-01 20:59:29 +0000 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2013-05-01 20:59:29 +0000 |
commit | e6f7de360d9d088b0b728585435e137503977a71 (patch) | |
tree | ca26f5cfc1017429b4ddfd634952eb61c8e72d7b /channels | |
parent | 3992df6d41d6cb8bc471339c32162e4b6a5e4cbd (diff) |
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
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_local.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/channels/chan_local.c b/channels/chan_local.c index cb86873b1..52e496b07 100644 --- a/channels/chan_local.c +++ b/channels/chan_local.c @@ -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; } |