summaryrefslogtreecommitdiff
path: root/listen.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2013-01-19 18:30:23 +0100
committerFelix Fietkau <nbd@openwrt.org>2013-01-19 18:30:23 +0100
commit78f9f35e22c60d5748f0d69a202ca541c517f0bb (patch)
treee9be1da7f35f96d8b3bb3232cedc9a8324e3e709 /listen.c
parent9cfe019ff4b6637e2bb7fbf5fc8db37abdd3c569 (diff)
add support for deferring script requests, limit maximum number of script calls to 3, maximum number of connections to 100
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'listen.c')
-rw-r--r--listen.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/listen.c b/listen.c
index 37fc4bb..adf8b16 100644
--- a/listen.c
+++ b/listen.c
@@ -56,8 +56,8 @@ static void uh_poll_listeners(struct uloop_timeout *timeout)
{
struct listener *l;
- if ((!n_blocked && conf.max_requests) ||
- n_clients >= conf.max_requests)
+ if ((!n_blocked && conf.max_connections) ||
+ n_clients >= conf.max_connections)
return;
list_for_each_entry(l, &listeners, list) {
@@ -65,7 +65,7 @@ static void uh_poll_listeners(struct uloop_timeout *timeout)
continue;
l->fd.cb(&l->fd, ULOOP_READ);
- if (n_clients >= conf.max_requests)
+ if (n_clients >= conf.max_connections)
break;
n_blocked--;
@@ -92,7 +92,7 @@ static void listener_cb(struct uloop_fd *fd, unsigned int events)
break;
}
- if (conf.max_requests && n_clients >= conf.max_requests)
+ if (conf.max_connections && n_clients >= conf.max_connections)
uh_block_listener(l);
}