r1255 - in branches/1.0: . bin/varnishd

des at projects.linpro.no des at projects.linpro.no
Tue Feb 20 09:46:55 CET 2007


Author: des
Date: 2007-02-20 09:46:54 +0100 (Tue, 20 Feb 2007)
New Revision: 1255

Modified:
   branches/1.0/
   branches/1.0/bin/varnishd/cache_backend.c
Log:
 r34131 at cat (orig r1235):  phk | 2007-01-22 12:15:57 +0100
 Cache the workspace size from params so it doesn't change under us.
 



Property changes on: branches/1.0
___________________________________________________________________
Name: svk:merge
   - d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1234
   + d4fa192b-c00b-0410-8231-f00ffab90ce4:/trunk/varnish-cache:1235

Modified: branches/1.0/bin/varnishd/cache_backend.c
===================================================================
--- branches/1.0/bin/varnishd/cache_backend.c	2007-02-20 08:46:53 UTC (rev 1254)
+++ branches/1.0/bin/varnishd/cache_backend.c	2007-02-20 08:46:54 UTC (rev 1255)
@@ -64,9 +64,10 @@
 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 @@
 	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);
 }
 




More information about the varnish-commit mailing list