Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-zipflow
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-zipflow
Commits
9c9ed3ff
Unverified
Commit
9c9ed3ff
authored
Jul 25, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor zipflow request allocation
parent
9a8bc6d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
vmod_zipflow.c
src/vmod_zipflow.c
+21
-9
No files found.
src/vmod_zipflow.c
View file @
9c9ed3ff
...
...
@@ -110,6 +110,26 @@ get_zipflow_top(VRT_CTX)
static
struct
vdp
vdp_zipflow
;
static
struct
zipflow_request
*
new_zipflow_request
(
VRT_CTX
,
struct
zipflow_top
*
zft
)
{
struct
zipflow_request
*
zfr
;
WS_TASK_ALLOC_OBJ
(
ctx
,
zfr
,
ZIPFLOW_REQUEST_MAGIC
);
if
(
zfr
==
NULL
)
return
(
NULL
);
VSTAILQ_INSERT_TAIL
(
&
zft
->
head
,
zfr
,
list
);
zfr
->
bundle
=
1
;
zfr
->
level
=
default_level
;
zfr
->
name
=
"unnamed_file"
;
zfr
->
mode
=
0644
;
zfr
->
atime
=
ctx
->
now
;
zfr
->
mtime
=
ctx
->
now
;
return
(
zfr
);
}
static
struct
zipflow_request
*
get_zipflow_request
(
VRT_CTX
)
{
...
...
@@ -132,18 +152,10 @@ get_zipflow_request(VRT_CTX)
if
(
zft
==
NULL
)
return
(
NULL
);
WS_TASK_ALLOC_OBJ
(
ctx
,
zfr
,
ZIPFLOW_REQUEST_MAGIC
);
zfr
=
new_zipflow_request
(
ctx
,
zft
);
if
(
zfr
==
NULL
)
return
(
NULL
);
VSTAILQ_INSERT_TAIL
(
&
zft
->
head
,
zfr
,
list
);
zfr
->
bundle
=
1
;
zfr
->
level
=
default_level
;
zfr
->
name
=
"unnamed_file"
;
zfr
->
mode
=
0644
;
zfr
->
atime
=
ctx
->
now
;
zfr
->
mtime
=
ctx
->
now
;
task_priv
->
priv
=
zfr
;
return
(
zfr
);
}
...
...
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