Merge "realtime: Centralize some common realtime backend code"

This commit is contained in:
Joshua Colp
2017-02-22 05:53:50 -06:00
committed by Gerrit Code Review
8 changed files with 37 additions and 25 deletions

View File

@@ -1038,10 +1038,8 @@ static struct ast_config *realtime_multi_ldap(const char *basedn,
struct ast_variable **p = vars;
while (*p) {
struct ast_category *cat = NULL;
cat = ast_category_new("", table_name, -1);
struct ast_category *cat = ast_category_new_anonymous();
if (!cat) {
ast_log(LOG_ERROR, "Unable to create a new category!\n");
break;
} else {
struct ast_variable *var = *p;
@@ -1190,7 +1188,7 @@ static struct ast_config *config_ldap(const char *basedn, const char *table_name
if (!last_category || strcmp(last_category, categories[i].name) ||
last_category_metric != categories[i].metric) {
cur_cat = ast_category_new(categories[i].name, table_name, -1);
cur_cat = ast_category_new_dynamic(categories[i].name);
if (!cur_cat) {
break;
}