Merge "aco: Minimize use of regex." into 13

This commit is contained in:
Jenkins2
2017-12-18 13:32:31 -06:00
committed by Gerrit Code Review
17 changed files with 124 additions and 73 deletions

View File

@@ -39,8 +39,8 @@ static struct aco_type general_option = {
.type = ACO_GLOBAL,
.name = "general",
.item_offset = offsetof(struct ast_ari_conf, general),
.category = "^general$",
.category_match = ACO_WHITELIST,
.category = "general",
.category_match = ACO_WHITELIST_EXACT,
};
static struct aco_type *general_options[] = ACO_TYPES(&general_option);
@@ -156,8 +156,8 @@ static void *user_find(struct ao2_container *tmp_container, const char *cat)
static struct aco_type user_option = {
.type = ACO_ITEM,
.name = "user",
.category_match = ACO_BLACKLIST,
.category = "^general$",
.category_match = ACO_BLACKLIST_EXACT,
.category = "general",
.matchfield = "type",
.matchvalue = "user",
.item_alloc = user_alloc,

View File

@@ -260,8 +260,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "general",
.item_offset = offsetof(struct module_config, general),
.category_match = ACO_WHITELIST,
.category = "^general$",
.category_match = ACO_WHITELIST_EXACT,
.category = "general",
};
struct aco_type *global_options[] = ACO_TYPES(&global_option);

View File

@@ -291,8 +291,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "globals",
.item_offset = offsetof(struct parking_config, global),
.category_match = ACO_WHITELIST,
.category = "^general$",
.category_match = ACO_WHITELIST_EXACT,
.category = "general",
};
struct aco_type *global_options[] = ACO_TYPES(&global_option);
@@ -300,8 +300,8 @@ struct aco_type *global_options[] = ACO_TYPES(&global_option);
static struct aco_type parking_lot_type = {
.type = ACO_ITEM,
.name = "parking_lot",
.category_match = ACO_BLACKLIST,
.category = "^(general)$",
.category_match = ACO_BLACKLIST_EXACT,
.category = "general",
.item_alloc = parking_lot_cfg_alloc,
.item_find = named_item_find,
.item_offset = offsetof(struct parking_config, parking_lots),

View File

@@ -82,7 +82,7 @@
order; any other header is treated as part of the SIP
request.</para>
</description>
<configOption name="^.*$">
<configOption name="">
<synopsis>A key/value pair to add to a NOTIFY request.</synopsis>
<description>
<para>If the key is <literal>Content</literal>,
@@ -234,8 +234,8 @@ static void *notify_cfg_alloc(void)
static struct aco_type notify_option = {
.type = ACO_ITEM,
.name = "notify",
.category_match = ACO_BLACKLIST,
.category = "^general$",
.category_match = ACO_BLACKLIST_EXACT,
.category = "general",
.item_offset = offsetof(struct notify_cfg, notify_options),
.item_alloc = notify_option_alloc,
.item_find = notify_option_find
@@ -993,7 +993,7 @@ static int load_module(void)
return AST_MODULE_LOAD_DECLINE;
}
aco_option_register_custom(&notify_cfg, "^.*$", ACO_REGEX, notify_options,
aco_option_register_custom(&notify_cfg, "", ACO_PREFIX, notify_options,
"", notify_option_handler, 0);
if (aco_process_config(&notify_cfg, 0)) {

View File

@@ -233,8 +233,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "global",
.item_offset = offsetof(struct conf, global),
.category = "^general$",
.category_match = ACO_WHITELIST
.category = "general",
.category_match = ACO_WHITELIST_EXACT,
};
static struct aco_type *global_options[] = ACO_TYPES(&global_option);

View File

@@ -822,8 +822,8 @@ static struct aco_type global_option = {
.type = ACO_GLOBAL,
.name = "global",
.item_offset = offsetof(struct xmpp_config, global),
.category_match = ACO_WHITELIST,
.category = "^general$",
.category_match = ACO_WHITELIST_EXACT,
.category = "general",
};
struct aco_type *global_options[] = ACO_TYPES(&global_option);
@@ -831,8 +831,8 @@ struct aco_type *global_options[] = ACO_TYPES(&global_option);
static struct aco_type client_option = {
.type = ACO_ITEM,
.name = "client",
.category_match = ACO_BLACKLIST,
.category = "^(general)$",
.category_match = ACO_BLACKLIST_EXACT,
.category = "general",
.item_alloc = ast_xmpp_client_config_alloc,
.item_find = xmpp_config_find,
.item_prelink = xmpp_config_prelink,