aboutsummaryrefslogtreecommitdiffstats
path: root/apps/app_followme.c
diff options
context:
space:
mode:
authorrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-07 20:02:07 +0000
committerrussell <russell@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-07 20:02:07 +0000
commit2945cbf4cc603292be95dadb8a3bec4d9fcd7d9c (patch)
tree20bd3df1817327eaff5ef8013a81b5a3c24daf05 /apps/app_followme.c
parentd2f4a899c20a2890068c30868aa86eab68fb676e (diff)
simplify the loop that iterates through the categories in followme.conf and
don't try to read the general section as a followme profile git-svn-id: http://svn.digium.com/svn/asterisk/trunk@32878 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps/app_followme.c')
-rw-r--r--apps/app_followme.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/app_followme.c b/apps/app_followme.c
index 5b6a8f184..d0a8d3c08 100644
--- a/apps/app_followme.c
+++ b/apps/app_followme.c
@@ -279,7 +279,7 @@ static int reload_followme(void)
{
struct ast_call_followme *f;
struct ast_config *cfg;
- char *cat, *tmp;
+ char *cat = NULL, *tmp;
struct ast_variable *var;
struct number *cur, *nm;
int new, idx;
@@ -346,8 +346,9 @@ static int reload_followme(void)
ast_copy_string(sorryprompt, tmpstr, sizeof(sorryprompt));
/* Chug through config file */
- cat = ast_category_browse(cfg, NULL);
- while(cat) {
+ while ((cat = ast_category_browse(cfg, cat))) {
+ if (!strcasecmp(cat, "general"))
+ continue;
/* Define a new profile */
/* Look for an existing one */
AST_LIST_TRAVERSE(&followmes, f, entry) {
@@ -416,7 +417,6 @@ static int reload_followme(void)
AST_LIST_INSERT_HEAD(&followmes, f, entry);
}
}
- cat = ast_category_browse(cfg, cat);
}
ast_config_destroy(cfg);