diff --git a/NEWS b/NEWS index d4cc381c..2c7c538c 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,7 @@ NEWS * Do not pass Proxy-Connection: header from client to backend http server in mod_proxy (#1877) * Fix wrong malloc sizes in mod_accesslog (probably nothing bad happened...) (fixes #1855, thx ycheng) * Some small buffer.c fixes (closes #1837) + * Remove floating point math from server.c (fixes #1402) - 1.4.20 - 2008-09-30 diff --git a/src/server.c b/src/server.c index d20c1c3b..92d79cd8 100644 --- a/src/server.c +++ b/src/server.c @@ -1295,7 +1295,7 @@ int main (int argc, char **argv) { if (srv->sockets_disabled) { /* our server sockets are disabled, why ? */ - if ((srv->cur_fds + srv->want_fds < srv->max_fds * 0.8) && /* we have enough unused fds */ + if ((srv->cur_fds + srv->want_fds < srv->max_fds * 8 / 10) && /* we have enough unused fds */ (srv->conns->used < srv->max_conns * 0.9) && (0 == graceful_shutdown)) { for (i = 0; i < srv->srv_sockets.used; i++) { @@ -1308,7 +1308,7 @@ int main (int argc, char **argv) { srv->sockets_disabled = 0; } } else { - if ((srv->cur_fds + srv->want_fds > srv->max_fds * 0.9) || /* out of fds */ + if ((srv->cur_fds + srv->want_fds > srv->max_fds * 9 / 10) || /* out of fds */ (srv->conns->used > srv->max_conns) || /* out of connections */ (graceful_shutdown)) { /* graceful_shutdown */