aboutsummaryrefslogtreecommitdiffstats
path: root/common/channel.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:40 +0200
committerGerd Hoffmann <kraxel@redhat.com>2010-04-01 11:24:40 +0200
commit9bbee7df3b13eb0caf1874748038235350916fbd (patch)
tree3fb2783458e405e75e9e0b2fc4e26f38ee601f0d /common/channel.c
parent82fbaff22e3e4b1bbdd1e2192cfeff061ce7285c (diff)
v3.84
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