]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
anvil: Recent changes broke penalty timeout handling.
authorTimo Sirainen <tss@iki.fi>
Thu, 4 Mar 2010 18:58:31 +0000 (20:58 +0200)
committerTimo Sirainen <tss@iki.fi>
Thu, 4 Mar 2010 18:58:31 +0000 (20:58 +0200)
--HG--
branch : HEAD

src/anvil/penalty.c

index 4c0d31288c2f7d33b975f4938aafe41d18387a85..8750b78c51d375c9dd4c5ec0cc8cebafc0747b0e 100644 (file)
@@ -163,6 +163,8 @@ static void penalty_timeout(struct penalty *penalty)
        time_t rec_last_update, expire_time;
        unsigned int diff;
 
+       timeout_remove(&penalty->to);
+
        expire_time = ioloop_time - penalty->expire_secs;
        while (penalty->oldest != NULL) {
                rec = penalty->oldest;
@@ -177,7 +179,6 @@ static void penalty_timeout(struct penalty *penalty)
                hash_table_remove(penalty->hash, rec->ident);
                penalty_rec_free(penalty, rec);
        }
-       timeout_remove(&penalty->to);
 }
 
 void penalty_inc(struct penalty *penalty, const char *ident,