[asterisk-commits] trunk r32878 - /trunk/apps/app_followme.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Wed Jun 7 13:02:08 MST 2006
Author: russell
Date: Wed Jun 7 15:02:07 2006
New Revision: 32878
URL: http://svn.digium.com/view/asterisk?rev=32878&view=rev
Log:
simplify the loop that iterates through the categories in followme.conf and
don't try to read the general section as a followme profile
Modified:
trunk/apps/app_followme.c
Modified: trunk/apps/app_followme.c
URL: http://svn.digium.com/view/asterisk/trunk/apps/app_followme.c?rev=32878&r1=32877&r2=32878&view=diff
==============================================================================
--- trunk/apps/app_followme.c (original)
+++ trunk/apps/app_followme.c Wed Jun 7 15:02:07 2006
@@ -279,7 +279,7 @@
{
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 @@
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 @@
AST_LIST_INSERT_HEAD(&followmes, f, entry);
}
}
- cat = ast_category_browse(cfg, cat);
}
ast_config_destroy(cfg);
More information about the asterisk-commits
mailing list