Skip to content
This repository has been archived by the owner on Jul 30, 2021. It is now read-only.

Commit

Permalink
Use the req workspace, not the worker workspace, as we cannot
Browse files Browse the repository at this point in the history
trust that to be the same throughout the request.
  • Loading branch information
bsdphk committed Feb 8, 2012
1 parent 1366473 commit 4d4e9f7
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/libvmod_std/vmod_std.c
Expand Up @@ -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) {
Expand All @@ -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);
}
}
Expand Down

0 comments on commit 4d4e9f7

Please sign in to comment.