Browse Source

* filter.[ch]: dlsym error()

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

2
src/filter.c

@ -91,6 +91,8 @@ f2b_filter_create(f2b_config_section_t *config, const char *file) {
goto cleanup;
if ((*(void **) (&filter->append) = dlsym(filter->h, "append")) == NULL)
goto cleanup;
if ((*(void **) (&filter->error) = dlsym(filter->h, "error")) == NULL)
goto cleanup;
if ((*(void **) (&filter->ready) = dlsym(filter->h, "ready")) == NULL)
goto cleanup;
if ((*(void **) (&filter->match) = dlsym(filter->h, "match")) == NULL)

1
src/filter.h

@ -16,6 +16,7 @@ typedef struct f2b_filter_t {
void *(*create) (const char *id);
bool (*config) (void *cfg, const char *key, const char *value);
bool (*append) (void *cfg, const char *pattern);
char *(*error) (void *cfg);
bool (*ready) (void *cfg);
bool (*match) (void *cfg, const char *line, char *buf, size_t buf_size);
void (*destroy) (void *cfg);

Loading…
Cancel
Save