Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
629c3f17
Unverified
Commit
629c3f17
authored
Jan 05, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor VRT_priv_task()
Pull out determining the privs head Re-use will come with a PR
parent
68cadaee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
cache_vrt_priv.c
bin/varnishd/cache/cache_vrt_priv.c
+14
-15
No files found.
bin/varnishd/cache/cache_vrt_priv.c
View file @
629c3f17
...
...
@@ -139,8 +139,8 @@ vrt_priv_dynamic(struct ws *ws, struct vrt_privs *privs, uintptr_t vmod_id)
return
(
vp
->
priv
);
}
st
ruct
vmod_priv
*
VRT_priv_task
(
VRT_CTX
,
const
void
*
vmod_id
)
st
atic
struct
vrt_privs
*
vrt_priv_task_context
(
VRT_CTX
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
...
...
@@ -156,27 +156,26 @@ VRT_priv_task(VRT_CTX, const void *vmod_id)
if
(
ctx
->
req
)
{
CHECK_OBJ_NOTNULL
(
ctx
->
req
,
REQ_MAGIC
);
return
(
vrt_priv_dynamic
(
ctx
->
ws
,
ctx
->
req
->
privs
,
(
uintptr_t
)
vmod_id
));
return
(
ctx
->
req
->
privs
);
}
if
(
ctx
->
bo
)
{
CHECK_OBJ_NOTNULL
(
ctx
->
bo
,
BUSYOBJ_MAGIC
);
return
(
vrt_priv_dynamic
(
ctx
->
ws
,
ctx
->
bo
->
privs
,
(
uintptr_t
)
vmod_id
));
return
(
ctx
->
bo
->
privs
);
}
ASSERT_CLI
();
return
(
cli_task_privs
);
}
struct
vmod_priv
*
VRT_priv_task
(
VRT_CTX
,
const
void
*
vmod_id
)
{
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
return
(
vrt_priv_dynamic
(
ctx
->
ws
,
cli_task_privs
,
(
uintptr_t
)
vmod_id
));
vrt_priv_task_context
(
ctx
),
(
uintptr_t
)
vmod_id
));
}
struct
vmod_priv
*
...
...
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