]> mj.ucw.cz Git - bouncer.git/blobdiff - bouncer.c
make release: Reorganization of directory structure
[bouncer.git] / bouncer.c
index 9544e5017ce48e4e5a0f2fc84a5c11e0b76b63d7..08f65716f499ee17422b985bd8a792611284601f 100644 (file)
--- a/bouncer.c
+++ b/bouncer.c
@@ -351,9 +351,9 @@ static void culprit_timer(struct main_timer *tm)
       break;
     case STATE_BANNED:
       msg(L_INFO, "Unbanned %s", AFMT(c->addr));
+      c->fail_count = 0;
       culprit_set_state(c, STATE_PROBATION, probation_time);
       is_modify(0, c->addr);
-      c->fail_count = 0;
       break;
     default:
       ASSERT(0);
@@ -408,6 +408,9 @@ static void parse_failure(char *p, int cnt)
        rhost = val;
     }
 
+  if (!rhost || !rhost[0])
+    return;
+
   // Act on the message
   struct addr addr;
   if (addr_parse(&addr, rhost))