Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Commits

[master] 4d4e9f7 Use the req workspace, not the worker workspace, as we cannot trust that to be the same throughout the request.

 

 

Varnish commits RSS feed   Index | Next | Previous | View Threaded


phk at varnish-cache

Feb 8, 2012, 3:09 PM

Post #1 of 1 (24 views)
Permalink
[master] 4d4e9f7 Use the req workspace, not the worker workspace, as we cannot trust that to be the same throughout the request.

commit 4d4e9f7f2a079290bad85275ac9146b49df1a32e
Author: Poul-Henning Kamp <phk [at] FreeBSD>
Date: Wed Feb 8 23:09:12 2012 +0000

Use the req workspace, not the worker workspace, as we cannot
trust that to be the same throughout the request.

diff --git a/lib/libvmod_std/vmod_std.c b/lib/libvmod_std/vmod_std.c
index b2ab419..e363b2d 100644
--- a/lib/libvmod_std/vmod_std.c
+++ b/lib/libvmod_std/vmod_std.c
@@ -58,8 +58,8 @@ vmod_updown(struct sess *sp, int up, const char *s, va_list ap)
const char *p;

CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
- u = WS_Reserve(sp->wrk->ws, 0);
- e = b = sp->wrk->ws->f;
+ u = WS_Reserve(sp->req->ws, 0);
+ e = b = sp->req->ws->f;
e += u;
p = s;
while (p != vrt_magic_string_end && b < e) {
@@ -76,12 +76,12 @@ vmod_updown(struct sess *sp, int up, const char *s, va_list ap)
*b = '\0';
b++;
if (b > e) {
- WS_Release(sp->wrk->ws, 0);
+ WS_Release(sp->req->ws, 0);
return (NULL);
} else {
e = b;
- b = sp->wrk->ws->f;
- WS_Release(sp->wrk->ws, e - b);
+ b = sp->req->ws->f;
+ WS_Release(sp->req->ws, e - b);
return (b);
}
}

_______________________________________________
varnish-commit mailing list
varnish-commit [at] varnish-cache
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit

Varnish commits RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.