Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvdp-pesi
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Jobs
Commits
Open sidebar
uplex-varnish
libvdp-pesi
Commits
77507150
Commit
77507150
authored
Jul 30, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor the specific vdp close function
parent
96ca4949
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
13 deletions
+9
-13
vdp_pesi.c
src/vdp_pesi.c
+9
-13
No files found.
src/vdp_pesi.c
View file @
77507150
...
...
@@ -287,7 +287,6 @@ struct pesi {
const
struct
vdp
VDP_pesi_buf
;
static
const
struct
transport
VPED_transport
;
static
void
req_fini
(
struct
req
**
,
struct
worker
*
);
static
void
vped_close_pesi_vdps
(
struct
req
*
req
);
// node finalizers
static
void
...
...
@@ -2410,8 +2409,13 @@ vped_reembark(struct worker *wrk, struct req *req)
Lck_Unlock
(
&
req
->
sp
->
mtx
);
}
/*
* close first vdp and assert it has the right type
*
* there must be at least one vdp remaining
*/
static
void
vped_close_
pesi_vdps
(
struct
req
*
req
)
vped_close_
first_vdp
(
struct
req
*
req
,
const
struct
vdp
*
vdp
)
{
struct
vdp_entry
*
vdpe
;
struct
vdp_ctx
*
vdc
;
...
...
@@ -2421,16 +2425,7 @@ vped_close_pesi_vdps(struct req *req)
vdc
=
req
->
vdc
;
vdpe
=
VTAILQ_FIRST
(
&
vdc
->
vdp
);
CHECK_OBJ_NOTNULL
(
vdpe
,
VDP_ENTRY_MAGIC
);
assert
(
vdpe
->
vdp
==
&
VDP_pesi
);
AN
(
vdpe
->
vdp
->
fini
);
AZ
(
vdpe
->
vdp
->
fini
(
req
,
&
vdpe
->
priv
));
AZ
(
vdpe
->
priv
);
VTAILQ_REMOVE
(
&
vdc
->
vdp
,
vdpe
,
list
);
vdpe
=
VTAILQ_FIRST
(
&
vdc
->
vdp
);
CHECK_OBJ_NOTNULL
(
vdpe
,
VDP_ENTRY_MAGIC
);
assert
(
vdpe
->
vdp
==
&
VDP_pesi_buf
);
assert
(
vdpe
->
vdp
==
vdp
);
AN
(
vdpe
->
vdp
->
fini
);
AZ
(
vdpe
->
vdp
->
fini
(
req
,
&
vdpe
->
priv
));
AZ
(
vdpe
->
priv
);
...
...
@@ -2594,7 +2589,8 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
* XXX cleanup
*/
clean:
vped_close_pesi_vdps
(
req
);
vped_close_first_vdp
(
req
,
&
VDP_pesi
);
vped_close_first_vdp
(
req
,
&
VDP_pesi_buf
);
out:
Lck_Lock
(
&
tree
->
tree_lock
);
set_closed
(
tree
,
node
);
...
...
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