Ticket #42 (closed defect: invalid)
Rate controls not work
| Reported by: | smoku | Owned by: | smoku |
|---|---|---|---|
| Priority: | major | Component: | General |
| Version: | 2.1 | Keywords: | |
| Cc: | Tracforge_linkmap: | ||
| Blocking: | Blocked By: |
Description
Set
<limits>
<connects seconds='60' throttle='600'>10</connects>
</limits>
Block always after 10 logins.
--- rate.c.orig 2002-11-04 07:52:26.000000000 +0300
+++ rate.c 2005-11-16 14:07:29.000000000 +0300
@@ -82,6 +82,15 @@
now = time(NULL);
+ /* rate expired */
+ if(rt->count = rt->total){
+ if(now - rt->time >= rt->seconds)
+ {
+ rate_reset(rt);
+ return 1;
+ }
+ }
+
/* currently bad */
if(rt->bad != 0)
{
@@ -96,12 +105,6 @@
return 0;
}
- /* rate expired */
- if(time(NULL) - rt->time >= rt->seconds)
- {
- rate_reset(rt);
- return 1;
- }
/* they're inside the time, and not bad yet */
return 1;
Change History
Note: See
TracTickets for help on using
tickets.
