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
This commit is contained in:
dwmalone 2003-07-15 16:46:45 +00:00
parent 2f4edcd095
commit 48243b0d55

@ -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,