Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-gcrypt
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
libvmod-gcrypt
Commits
39a84e09
Commit
39a84e09
authored
Mar 11, 2021
by
Geoff Simmons
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use methods object for privs after Varnish refactoring.
parent
8c00786e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
3 deletions
+12
-3
vmod_gcrypt.c
src/vmod_gcrypt.c
+12
-3
No files found.
src/vmod_gcrypt.c
View file @
39a84e09
...
...
@@ -749,7 +749,7 @@ vmod_random(VRT_CTX, struct VARGS(random)*args)
rnd_task
->
priv
=
rnd_blob
;
rnd_task
->
len
=
sizeof
(
*
rnd_blob
);
rnd_task
->
free
=
NULL
;
AZ
(
rnd_task
->
methods
)
;
return
rnd_blob
;
}
...
...
@@ -951,11 +951,12 @@ vmod_wipe(VRT_CTX, VCL_BLOB b)
/* Function fileread */
static
void
filedata_free
(
void
*
p
)
filedata_free
(
VRT_CTX
,
void
*
p
)
{
struct
filedata_head
*
fhead
;
struct
filedata
*
f
;
CHECK_OBJ_NOTNULL
(
ctx
,
VRT_CTX_MAGIC
);
if
(
p
==
NULL
)
return
;
fhead
=
p
;
...
...
@@ -981,6 +982,14 @@ filedata_free(void *p)
free
(
fhead
);
}
#define VMOD_GCRYPT_FILE_MAGIC 0x9e381c85
static
const
struct
vmod_priv_methods
file_priv_task_methods
[
1
]
=
{{
.
magic
=
VMOD_PRIV_METHODS_MAGIC
,
.
type
=
"vmod_gcrypt_file_priv_task"
,
.
fini
=
filedata_free
,
}};
VCL_BLOB
vmod_fileread
(
VRT_CTX
,
struct
vmod_priv
*
task
,
VCL_STRING
path
)
{
...
...
@@ -1014,7 +1023,7 @@ vmod_fileread(VRT_CTX, struct vmod_priv *task, VCL_STRING path)
VSLIST_INIT
(
fhead
);
task
->
priv
=
fhead
;
task
->
len
=
sizeof
(
*
fhead
);
task
->
free
=
filedata_free
;
task
->
methods
=
file_priv_task_methods
;
}
else
fhead
=
task
->
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