[master] 2e1dcdf Use the argument provided workspace, rather than default to req->ws.
Poul-Henning Kamp
phk at varnish-cache.org
Tue Apr 23 11:20:09 CEST 2013
commit 2e1dcdfde32da298799cf3205cb5751e35a92bd4
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Apr 23 09:19:53 2013 +0000
Use the argument provided workspace, rather than default to req->ws.
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index 7ea7bcb..f6ad925 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -215,14 +215,14 @@ VRT_String(struct ws *ws, const char *h, const char *p, va_list ap)
*/
const char *
-VRT_ReqString(struct req *req, const char *p, ...)
+VRT_CollectString(struct ws *ws, const char *p, ...)
{
va_list ap;
char *b;
- CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
+ CHECK_OBJ_NOTNULL(ws, WS_MAGIC);
va_start(ap, p);
- b = VRT_String(req->ws, NULL, p, ap);
+ b = VRT_String(ws, NULL, p, ap);
va_end(ap);
return (b);
}
diff --git a/include/vrt.h b/include/vrt.h
index e71308a..9dfc649 100644
--- a/include/vrt.h
+++ b/include/vrt.h
@@ -232,4 +232,4 @@ char *VRT_TIME_string(struct ws *, double);
const char *VRT_BOOL_string(unsigned);
const char *VRT_BACKEND_string(const struct director *d);
-const char *VRT_ReqString(struct req *, const char *p, ...);
+const char *VRT_CollectString(struct ws *, const char *p, ...);
diff --git a/lib/libvcl/vcc_expr.c b/lib/libvcl/vcc_expr.c
index e2a2256..7caf25e 100644
--- a/lib/libvcl/vcc_expr.c
+++ b/lib/libvcl/vcc_expr.c
@@ -914,7 +914,7 @@ vcc_expr_strfold(struct vcc *tl, struct expr **e, enum var_type fmt)
if (fmt != STRING_LIST && (*e)->fmt == STRING_LIST)
*e = vcc_expr_edit(STRING,
- "\v+VRT_ReqString(req,\n\v1,\nvrt_magic_string_end)",
+ "\v+VRT_CollectString(ws,\n\v1,\nvrt_magic_string_end)\v-",
*e, NULL);
if (fmt == STRING_LIST && (*e)->fmt == STRING)
(*e)->fmt = STRING_LIST;
More information about the varnish-commit
mailing list