diff options
author | Joshua Colp <jcolp@digium.com> | 2017-12-18 14:41:55 -0600 |
---|---|---|
committer | Gerrit Code Review <gerrit2@gerrit.digium.api> | 2017-12-18 14:41:55 -0600 |
commit | bac31e55bb85ace72cf27155e84e569f6d7f6ada (patch) | |
tree | 08ce0b22b12fd558f535c1dd4ab604ba7b5563b7 /main/cdr.c | |
parent | a853b3bcffb3eaa771cf6f52e6e2e8893a2c657e (diff) | |
parent | 957709e1e824e221254599e4ad8445e3839ce535 (diff) |
Merge changes from topic 'faster-aco' into 15
* changes:
aco: Minimize use of regex.
aco: Create ways to minimize use of regex.
Diffstat (limited to 'main/cdr.c')
-rw-r--r-- | main/cdr.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/main/cdr.c b/main/cdr.c index 0e0366836..0f6a66517 100644 --- a/main/cdr.c +++ b/main/cdr.c @@ -238,8 +238,29 @@ static struct aco_type general_option = { .type = ACO_GLOBAL, .name = "general", .item_offset = offsetof(struct module_config, general), - .category = "^general$", - .category_match = ACO_WHITELIST, + .category = "general", + .category_match = ACO_WHITELIST_EXACT, +}; + +/*! Config sections used by existing modules. Do not add to this list. */ +static const char *ignore_categories[] = { + "csv", + "custom", + "manager", + "odbc", + "pgsql", + "radius", + "sqlite", + "tds", + "mysql", + NULL, +}; + +static struct aco_type ignore_option = { + .type = ACO_IGNORE, + .name = "modules", + .category = (const char*)ignore_categories, + .category_match = ACO_WHITELIST_ARRAY, }; static void *module_config_alloc(void); @@ -249,8 +270,7 @@ static void module_config_post_apply(void); /*! \brief The file definition */ static struct aco_file module_file_conf = { .filename = "cdr.conf", - .skip_category = "(^csv$|^custom$|^manager$|^odbc$|^pgsql$|^radius$|^sqlite$|^tds$|^mysql$)", - .types = ACO_TYPES(&general_option), + .types = ACO_TYPES(&general_option, &ignore_option), }; CONFIG_INFO_CORE("cdr", cfg_info, module_configs, module_config_alloc, |