Browse Source

* cfg filter definition : save path to file with regexps

master
Alex 'AdUser' Z 8 years ago
parent
commit
3c29801c8c
  1. 3
      src/filter.c
  2. 1
      src/filter.h

3
src/filter.c

@ -76,6 +76,7 @@ f2b_filter_create(f2b_config_section_t *config, const char *file) {
int flags = RTLD_NOW | RTLD_LOCAL;
const char *dlerr = NULL;
assert(file != NULL);
assert(config != NULL);
assert(config->type == t_filter);
@ -125,6 +126,8 @@ f2b_filter_create(f2b_config_section_t *config, const char *file) {
config->name, param->name, param->value);
}
strlcpy(filter->file, file, sizeof(filter->file));
if (!f2b_filter_load_file(filter, file))
goto cleanup;

1
src/filter.h

@ -13,6 +13,7 @@
typedef struct f2b_filter_t {
void *h;
void *cfg;
char file[PATH_MAX];
void *(*create) (const char *id);
bool (*config) (void *cfg, const char *key, const char *value);
bool (*append) (void *cfg, const char *pattern);

Loading…
Cancel
Save