aboutsummaryrefslogtreecommitdiffstats
path: root/common/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/channel.c')
-rw-r--r--common/channel.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/common/channel.c b/common/channel.c
index 567f6ae..b10802f 100644
--- a/common/channel.c
+++ b/common/channel.c
@@ -388,6 +388,7 @@ init_channel(char *name, struct CHANNEL *c)
void
read_config(char *conffile, int *argc, char **argv)
{
+ struct list_head *item;
char filename[100];
char *val;
int i;
@@ -489,10 +490,13 @@ read_config(char *conffile, int *argc, char **argv)
if (NULL != (val = cfg_get_str("global","mov-rate")))
mov_rate = val;
- if (NULL != (val = cfg_get_str("global","filter")))
- for (i = 0; NULL != ng_filters[i]; i++)
- if (0 == strcasecmp(ng_filters[i]->name, val))
- cur_filter=ng_filters[i];
+ if (NULL != (val = cfg_get_str("global","filter"))) {
+ list_for_each(item,&ng_filters) {
+ struct ng_filter *f = list_entry(item, struct ng_filter, list);
+ if (0 == strcasecmp(f->name, val))
+ cur_filter = f;
+ }
+ }
}
void

Privacy Policy