Browse Source

* more changes in backend test util

master
Alex 'AdUser' Z 8 years ago
parent
commit
81db1b8dca
  1. 15
      src/backend-test.c

15
src/backend-test.c

@ -41,18 +41,19 @@ int main(int argc, char *argv[]) {
return EXIT_FAILURE; return EXIT_FAILURE;
} }
if (!backend->ban(backend->cfg, ip)) { if (!f2b_backend_ban(backend, ip)) {
f2b_log_msg(log_error, "action 'ban' failed"); f2b_log_msg(log_error, "action 'ban' failed: %s", f2b_backend_error(backend));
goto cleanup; goto cleanup;
} }
if (!backend->check(backend->cfg, ip)) { if (f2b_backend_check(backend, ip)) {
f2b_log_msg(log_error, "action 'check' failed"); f2b_log_msg(log_info, "action 'check' failed returned true");
goto cleanup; } else {
f2b_log_msg(log_info, "action 'check' failed returned false");
} }
if (!backend->unban(backend->cfg, ip)) { if (f2b_backend_unban(backend, ip)) {
f2b_log_msg(log_error, "action 'unban' failed"); f2b_log_msg(log_error, "action 'unban' failed: %s", f2b_backend_error(backend));
goto cleanup; goto cleanup;
} }

Loading…
Cancel
Save