X-Git-Url: http://git.harvie.cz/?p=svn%2FPrometheus-QoS%2F.git;a=blobdiff_plain;f=prometheus.c;h=2eda2592210dfd88b0e774a7e32278ea6dcde8c3;hp=e068b8ef5f9011a1ad913611fdbca9ea7569a752;hb=e48d46c959233c89ccd6ccd411b31704610abb71;hpb=9a56ab25128074e581fa5f69bac8afa2fb939c82 diff --git a/prometheus.c b/prometheus.c index e068b8e..2eda259 100644 --- a/prometheus.c +++ b/prometheus.c @@ -980,13 +980,14 @@ Credit: CZFree.Net, Martin Devera, Netdave, Aquarius, Gandalf\n\n",version); for_each(ip, ips) if(ip->min == group->min && ip->max > ip->min) { - if( ip->keyword->data_limit && !ip->fixedprio - && ( ip->traffic>ip->credit - + (ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20))) ) + ip->realquota=ip->credit+(ip->min*ip->keyword->data_limit+(ip->keyword->fixed_limit<<20)); + if( ip->keyword->data_limit + and not ip->fixedprio + and ip->traffic > ip->realquota ) { - if(group_ratemax) + if(group_rate < ip->max) { - ip->max=group_rate; + ip->max = group_rate; } group_rate+=magic_treshold; ip->prio=lowest_priority;