Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
slash
Commits
afa202a8
Unverified
Commit
afa202a8
authored
Jun 17, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use $Restrict
parent
95bcaab7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
25 deletions
+20
-25
vmod_slash.c
src/vmod_slash.c
+6
-21
vmod_slash.man.rst
src/vmod_slash.man.rst
+10
-2
vmod_slash.vcc
src/vmod_slash.vcc
+4
-2
No files found.
src/vmod_slash.c
View file @
afa202a8
...
...
@@ -234,13 +234,8 @@ VCL_VOID vmod_buddy_as_transient(VRT_CTX, struct VPFX(slash_stv) *sb)
{
CHECK_OBJ_NOTNULL
(
sb
,
SLASH_BUDDY_MAGIC
);
if
(
ctx
->
method
==
VCL_MET_INIT
)
{
sbu_as_transient
(
sb
->
storage
);
return
;
}
VRT_fail
(
ctx
,
"%s.as_transient can only be called from vcl_init{}"
,
sb
->
name
);
assert
(
ctx
->
method
==
VCL_MET_INIT
);
sbu_as_transient
(
sb
->
storage
);
}
VCL_STRING
...
...
@@ -445,13 +440,8 @@ vmod_fellow_as_transient(VRT_CTX, struct VPFX(slash_stv) *sb)
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
CHECK_OBJ_NOTNULL
(
sb
,
SLASH_FELLOW_MAGIC
);
if
(
ctx
->
method
==
VCL_MET_INIT
)
{
sfe_as_transient
(
sb
->
storage
);
return
;
}
VRT_fail
(
ctx
,
"%s.as_transient can only be called from vcl_init{}"
,
sb
->
name
);
assert
(
ctx
->
method
==
VCL_MET_INIT
);
sfe_as_transient
(
sb
->
storage
);
}
VCL_VOID
...
...
@@ -459,13 +449,8 @@ vmod_as_transient(VRT_CTX, VCL_STEVEDORE stv)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
if
(
ctx
->
method
==
VCL_MET_INIT
)
{
sfe_as_transient
(
TRUST_ME
(
stv
));
return
;
}
VRT_fail
(
ctx
,
"slash.as_transient() can only be called from vcl_init{}"
);
assert
(
ctx
->
method
==
VCL_MET_INIT
);
sfe_as_transient
(
TRUST_ME
(
stv
));
}
VCL_STRING
...
...
src/vmod_slash.man.rst
View file @
afa202a8
...
...
@@ -388,7 +388,9 @@ VOID xbuddy.as_transient()
Set this buddy storage as the transient storage.
Can only be called from ``vcl_init {}``.
Restricted to: ``vcl_init``.
.. _slash.tune_buddy():
...
...
@@ -761,6 +763,10 @@ VOID xfellow.as_transient()
Set this fellow storage as the transient storage.
Restricted to: ``vcl_init``.
.. _slash.as_transient():
VOID as_transient(STEVEDORE)
...
...
@@ -768,7 +774,9 @@ VOID as_transient(STEVEDORE)
Set this storage as the transient storage.
Can only be called from ``vcl_init {}``.
Restricted to: ``vcl_init``.
.. _slash.tune_fellow():
...
...
src/vmod_slash.vcc
View file @
afa202a8
...
...
@@ -355,7 +355,7 @@ $Method VOID .as_transient()
Set this buddy storage as the transient storage.
Can only be called from ``vcl_init {}``.
$Restrict vcl_init
$Function STRING tune_buddy(
STEVEDORE storage,
...
...
@@ -693,11 +693,13 @@ $Method VOID .as_transient()
Set this fellow storage as the transient storage.
$Restrict vcl_init
$Function VOID as_transient(STEVEDORE)
Set this storage as the transient storage.
Can only be called from ``vcl_init {}``.
$Restrict vcl_init
$Function STRING tune_fellow(
STEVEDORE storage,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment