diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2003-07-15 16:46:45 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2003-07-15 16:46:45 +0000 |
commit | 48243b0d5531915e237d98f617cc91faa6bc4f88 (patch) | |
tree | 82b9498a54b9b86d95fde9f74977395c81660f75 /usr.sbin/inetd/inetd.c | |
parent | 2f4edcd095f6f89ddacb56ee68f3e75fc1079d26 (diff) | |
download | FreeBSD-src-48243b0d5531915e237d98f617cc91faa6bc4f88.zip FreeBSD-src-48243b0d5531915e237d98f617cc91faa6bc4f88.tar.gz |
Get the connections per minute calculation right. By good fortune
(or possibly testing) the previous formula worked for the default
constants compiled into inetd, but if you recompiled with different
values of CHTSIZE and CHTGRAN the calculation might not have worked.
PR: 54354
Submitted by: Claus Assmann <ca@sendmail.org>
Submitted by: Jose Marcio Martins da Cruz <Jose-Marcio.Martins@ensmp.fr>
MFC after: 5 days
Diffstat (limited to 'usr.sbin/inetd/inetd.c')
-rw-r--r-- | usr.sbin/inetd/inetd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/inetd/inetd.c b/usr.sbin/inetd/inetd.c index 213683c..cab156f 100644 --- a/usr.sbin/inetd/inetd.c +++ b/usr.sbin/inetd/inetd.c @@ -2338,7 +2338,7 @@ cpmip(const struct servtab *sep, int ctrl) cnt += ct->ct_Count; } } - if (cnt * (CHTSIZE * CHTGRAN) / 60 > sep->se_maxcpm) { + if ((cnt * 60) / (CHTSIZE * CHTGRAN) > sep->se_maxcpm) { char pname[INET6_ADDRSTRLEN]; getnameinfo((struct sockaddr *)&rss, |