Browse Source

* filter.[ch]: add f2b_filter_error()

master
Alex 'AdUser' Z 9 years ago
parent
commit
9b936f464d
  1. 6
      src/filter.c
  2. 1
      src/filter.h

6
src/filter.c

@ -154,3 +154,9 @@ f2b_filter_match(f2b_filter_t *filter, const char *line, char *buf, size_t buf_s
return filter->match(filter->cfg, line, buf, buf_size);
}
const char *
f2b_filter_error(f2b_filter_t *filter) {
assert(filter != NULL);
return filter->error(filter->cfg);
}

1
src/filter.h

@ -26,5 +26,6 @@ f2b_filter_t * f2b_filter_create (f2b_config_section_t *config, const char *id);
void f2b_filter_destroy(f2b_filter_t *b);
bool f2b_filter_match(f2b_filter_t *b, const char *line, char *buf, size_t buf_size);
const char * f2b_filter_error(f2b_filter_t *b);
#endif /* FILTER_H_ */

Loading…
Cancel
Save