Commit d0fc8377 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make the listen depth a paramter.

Clean up the paramter stuff even more.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@1002 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent c2f50e80
......@@ -103,9 +103,9 @@ fetch_chunked(const struct sess *sp, int fd, struct http *hp)
/* Get some storage if we don't have any */
if (st == NULL || st->len == st->space) {
v = u;
if (u < params->fetch_chunksize &&
if (u < params->fetch_chunksize * 1024 &&
stevedore->trim != NULL)
v = params->fetch_chunksize;
v = params->fetch_chunksize * 1024;
st = stevedore->alloc(stevedore, v);
XXXAN(st->stevedore);
TAILQ_INSERT_TAIL(&sp->obj->store, st, list);
......@@ -180,7 +180,8 @@ fetch_eof(const struct sess *sp, int fd, struct http *hp)
st = NULL;
while (1) {
if (v == 0) {
st = stevedore->alloc(stevedore, params->fetch_chunksize);
st = stevedore->alloc(stevedore,
params->fetch_chunksize * 1024);
XXXAN(st->stevedore);
TAILQ_INSERT_TAIL(&sp->obj->store, st, list);
p = st->ptr + st->len;
......
......@@ -61,6 +61,9 @@ struct params {
char *listen_address;
char *listen_host;
char *listen_port;
/* Listen depth */
unsigned listen_depth;
};
extern struct params *params;
......
This diff is collapsed.
......@@ -21,6 +21,7 @@
#include "compat/strndup.h"
#endif
#include "heritage.h"
#include "mgt.h"
#include "cli.h"
#include "cli_priv.h"
......@@ -165,7 +166,7 @@ TCP_open(const char *addr, const char *port, int http)
close(sd);
return (-1);
}
if (listen(sd, http ? 1024 : 16) != 0) {
if (listen(sd, http ? params->listen_depth : 16) != 0) {
perror("listen()");
freeaddrinfo(res);
close(sd);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment