Use $restrict

parent fc1ffc35
#-
# Copyright 2019 - 2021 UPLEX Nils Goroll Systemoptimierung
# Copyright 2019 - 2023 UPLEX Nils Goroll Systemoptimierung
# All rights reserved
#
# Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de>
......@@ -127,12 +127,9 @@ details see `RESOURCE USAGE, CONFIGURATION AND MONITORING`_ below.
$Function VOID activate()
Enable parallel ESI processing for the client response.
``pesi.activate()`` MUST be called in ``vcl_deliver {}`` only. If it is
called in any other VCL subroutine, VCL failure is invoked (see
`ERRORS`_ below for details).
$Restrict vcl_deliver
If ``pesi.activate()`` is called on *any* ESI level (any depth of include
nesting), then it MUST be called on *all* levels of the response. If
......@@ -216,8 +213,7 @@ identified by the ENUM ``parameter``. Currently the parameters can
only be set with a boolean value in ``bool`` (but future versions of
this function may allow for setting other data types).
``pesi.set()`` MUST be called in ``vcl_deliver {}`` only; otherwise VCL
failure is invoked (see `ERRORS`_).
$Restrict vcl_deliver
The parameters that can be set are currently ``serial`` and ``thread``:
......
......@@ -228,11 +228,7 @@ vmod_activate(VRT_CTX)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->method != VCL_MET_DELIVER) {
VRT_fail(ctx, "pesi.activate() may only be called "
"from vcl_deliver{}");
return;
}
assert(ctx->method == VCL_MET_DELIVER);
req = ctx->req;
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
......@@ -282,11 +278,7 @@ vmod_set(VRT_CTX, struct VARGS(set) *args)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->method != VCL_MET_DELIVER) {
VRT_fail(ctx, "pesi.set() may only be called "
"from vcl_deliver{}");
return;
}
assert(ctx->method == VCL_MET_DELIVER);
/* as of now, all parameters require a bool parameter */
if (args->valid_bool == 0) {
......
......@@ -118,9 +118,7 @@ VOID activate()
Enable parallel ESI processing for the client response.
``pesi.activate()`` MUST be called in ``vcl_deliver {}`` only. If it is
called in any other VCL subroutine, VCL failure is invoked (see
`ERRORS`_ below for details).
Restricted to: ``vcl_deliver``
If ``pesi.activate()`` is called on *any* ESI level (any depth of include
nesting), then it MUST be called on *all* levels of the response. If
......@@ -207,8 +205,7 @@ identified by the ENUM ``parameter``. Currently the parameters can
only be set with a boolean value in ``bool`` (but future versions of
this function may allow for setting other data types).
``pesi.set()`` MUST be called in ``vcl_deliver {}`` only; otherwise VCL
failure is invoked (see `ERRORS`_).
Restricted to: ``vcl_deliver``
The parameters that can be set are currently ``serial`` and ``thread``:
......@@ -794,7 +791,7 @@ COPYRIGHT
::
Copyright 2019 - 2021 UPLEX Nils Goroll Systemoptimierung
Copyright 2019 - 2023 UPLEX Nils Goroll Systemoptimierung
All rights reserved
Authors: Geoffrey Simmons <geoffrey.simmons@uplex.de>
......
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