Browse Source

* 'error' function fo backend

master
Alex 'AdUser' Z 9 years ago
parent
commit
2c93872b40
  1. 2
      src/backend.c
  2. 1
      src/backend.h
  3. 1
      src/backends/backend.h

2
src/backend.c

@ -30,6 +30,8 @@ f2b_backend_create(f2b_config_section_t *config, const char *id) {
goto cleanup;
if ((*(void **) (&backend->ready) = dlsym(backend->h, "ready")) == NULL)
goto cleanup;
if ((*(void **) (&backend->error) = dlsym(backend->h, "error")) == NULL)
goto cleanup;
if ((*(void **) (&backend->start) = dlsym(backend->h, "start")) == NULL)
goto cleanup;
if ((*(void **) (&backend->stop) = dlsym(backend->h, "stop")) == NULL)

1
src/backend.h

@ -10,6 +10,7 @@ typedef struct f2b_backend_t {
void *(*create) (const char *id);
bool (*config) (void *cfg, const char *key, const char *value);
bool (*ready) (void *cfg);
char (*error) (void *cfg);
bool (*start) (void *cfg);
bool (*stop) (void *cfg);
bool (*ping) (void *cfg);

1
src/backends/backend.h

@ -9,6 +9,7 @@ typedef struct _config cfg_t;
extern cfg_t *create(const char *id);
extern bool config(cfg_t *c, const char *key, const char *value);
extern bool ready(cfg_t *c);
extern char *error(cfg_t *c);
extern bool start(cfg_t *c);
extern bool stop(cfg_t *c);
extern bool ping(cfg_t *c);

Loading…
Cancel
Save