summaryrefslogtreecommitdiff
path: root/apps/app_agent_pool.c
diff options
context:
space:
mode:
authorJoshua Colp <jcolp@digium.com>2017-12-18 14:41:41 -0600
committerGerrit Code Review <gerrit2@gerrit.digium.api>2017-12-18 14:41:41 -0600
commit5224fd3ab4771fb178387c631cfa43e0c66a2d1c (patch)
tree3d3fb30cb1b0961d4b6c32fc870e70c40dd92b25 /apps/app_agent_pool.c
parent7909e372f8e5ca050b5bd069f9105de64f7575ca (diff)
parentbf2d35931d65c73bbb3efec5ce9d284a730cae5e (diff)
Merge changes from topic 'faster-aco'
* changes: aco: Minimize use of regex. aco: Create ways to minimize use of regex.
Diffstat (limited to 'apps/app_agent_pool.c')
-rw-r--r--apps/app_agent_pool.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/app_agent_pool.c b/apps/app_agent_pool.c
index 6a8c3955b..3c2ea3870 100644
--- a/apps/app_agent_pool.c
+++ b/apps/app_agent_pool.c
@@ -455,11 +455,17 @@ struct agents_cfg {
struct ao2_container *agents;
};
+static const char *agent_type_blacklist[] = {
+ "general",
+ "agents",
+ NULL,
+};
+
static struct aco_type agent_type = {
.type = ACO_ITEM,
.name = "agent-id",
- .category_match = ACO_BLACKLIST,
- .category = "^(general|agents)$",
+ .category_match = ACO_BLACKLIST_ARRAY,
+ .category = (const char *)agent_type_blacklist,
.item_alloc = agent_cfg_alloc,
.item_find = agent_cfg_find,
.item_offset = offsetof(struct agents_cfg, agents),
@@ -471,8 +477,8 @@ static struct aco_type *agent_types[] = ACO_TYPES(&agent_type);
static struct aco_type general_type = {
.type = ACO_GLOBAL,
.name = "global",
- .category_match = ACO_WHITELIST,
- .category = "^general$",
+ .category_match = ACO_WHITELIST_EXACT,
+ .category = "general",
};
static struct aco_file agents_conf = {