Project

General

Profile

src-server.c.patch

Remove dependency of floating point math. For embedded systems. - Anonymous, 2008-01-03 22:05

View differences:

lighttpd/src/server.c 2006-07-11 09:16:28.000000000 -0700
1174 1174
		if (srv->sockets_disabled) {
1175 1175
			/* our server sockets are disabled, why ? */
1176 1176

  
1177
			if ((srv->cur_fds + srv->want_fds < srv->max_fds * 0.8) && /* we have enough unused fds */
1178
			    (srv->conns->used < srv->max_conns * 0.9) &&
1177
			if ((srv->cur_fds + srv->want_fds < srv->max_fds * 8 / 10) && /* we have enough unused fds */
1178
			    (srv->conns->used < srv->max_conns * 9 / 10) &&
1179 1179
			    (0 == graceful_shutdown)) {
1180 1180
				for (i = 0; i < srv->srv_sockets.used; i++) {
1181 1181
					server_socket *srv_socket = srv->srv_sockets.ptr[i];
......
1187 1187
				srv->sockets_disabled = 0;
1188 1188
			}
1189 1189
		} else {
1190
			if ((srv->cur_fds + srv->want_fds > srv->max_fds * 0.9) || /* out of fds */
1190
			if ((srv->cur_fds + srv->want_fds > srv->max_fds * 9 / 10) || /* out of fds */
1191 1191
			    (srv->conns->used > srv->max_conns) || /* out of connections */
1192 1192
			    (graceful_shutdown)) { /* graceful_shutdown */ 
1193 1193