Commit b20f8557 authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

r34131@cat (orig r1235): phk | 2007-01-22 12:15:57 +0100

 Cache the workspace size from params so it doesn't change under us.
 


git-svn-id: http://www.varnish-cache.org/svn/branches/1.0@1255 d4fa192b-c00b-0410-8231-f00ffab90ce4
parents 7e333c70 ba9a6f74
......@@ -64,9 +64,10 @@ static struct vbe_conn *
vbe_new_conn(void)
{
struct vbe_conn *vbc;
unsigned char *p;
unsigned char *p, space;
vbc = calloc(sizeof *vbc + params->mem_workspace * 2, 1);
space = params->mem_workspace;
vbc = calloc(sizeof *vbc + space * 2, 1);
if (vbc == NULL)
return (NULL);
VSL_stats->n_vbe_conn++;
......@@ -75,9 +76,9 @@ vbe_new_conn(void)
vbc->http2 = &vbc->http_mem[1];
vbc->fd = -1;
p = (void *)(vbc + 1);
http_Setup(vbc->http, p, params->mem_workspace);
p += params->mem_workspace;
http_Setup(vbc->http2, p, params->mem_workspace);
http_Setup(vbc->http, p, space);
p += space;
http_Setup(vbc->http2, p, space);
return (vbc);
}
......
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