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
9a0f7f12
Commit
9a0f7f12
authored
Aug 02, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reorder code
parent
0f5f608d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
42 deletions
+42
-42
vdp_pesi.c
src/vdp_pesi.c
+42
-42
No files found.
src/vdp_pesi.c
View file @
9a0f7f12
...
...
@@ -1257,7 +1257,25 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
gz
=
NULL
;
}
if
(
obj_final
&&
!
obj_esi
&&
(
pesi
->
flags
&
PF_CFG_BLOCK_FINAL
)
==
0
)
{
if
(
obj_esi
)
{
VSLdbg
(
req
,
"vped_deliver: ESI"
);
VDP_Push
(
req
,
&
VDP_pesi_buf
,
pesi
);
push_vdps
(
req
,
vgzgz
,
gz
);
AN
(
parent
);
AZ
(
VDP_Push
(
req
,
&
vped_to_parent
,
parent
->
nexus
.
req
));
(
void
)
VDP_DeliverObj
(
req
);
/*
* only close the pesi VDPs, the others are to run from topreq
* delivery
*/
vped_close_vdp
(
req
,
0
,
&
VDP_pesi
);
vped_close_vdp
(
req
,
0
,
&
VDP_pesi_buf
);
return
;
}
else
if
(
obj_final
&&
(
pesi
->
flags
&
PF_CFG_BLOCK_FINAL
)
==
0
)
{
VSLdbg
(
req
,
"vped_deliver: T_NEXUS buffering no ESI"
);
VDP_Push
(
req
,
&
VDP_pesi_buf
,
pesi
);
...
...
@@ -1274,7 +1292,7 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
vped_close_vdp
(
req
,
0
,
&
VDP_pesi_buf
);
return
;
}
else
if
(
obj_final
&&
!
obj_esi
)
{
else
if
(
obj_final
)
{
VSLdbg
(
req
,
"vped_deliver: T_FINAL"
);
push_vdps
(
req
,
vgzgz
,
gz
);
...
...
@@ -1313,54 +1331,36 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
return
;
}
else
if
(
!
obj_esi
)
{
VSLdbg
(
req
,
"vped_deliver: T_SUBREQ"
);
AZ
(
req
->
objcore
->
flags
&
OC_F_FINAL
);
push_vdps
(
req
,
vgzgz
,
gz
);
AZ
(
VDP_Push
(
req
,
&
vped_to_parent
,
parent
->
nexus
.
req
));
node_mutate_prep
(
tree
,
node
);
VSLdbg
(
req
,
"vped_deliver: T_SUBREQ"
);
/* our caller, cnt_transmit(), releases the refs to boc and oc
* when we return, so in order to hand this request to the
* topreq thread, we need to gain one more
*/
node
->
subreq
.
req
=
req
;
node
->
subreq
.
boc
=
HSH_RefBoc
(
req
->
objcore
);
HSH_Ref
(
req
->
objcore
);
node
->
subreq
.
oc
=
req
->
objcore
;
AZ
(
req
->
objcore
->
flags
&
OC_F_FINAL
);
push_vdps
(
req
,
vgzgz
,
gz
);
AZ
(
VDP_Push
(
req
,
&
vped_to_parent
,
parent
->
nexus
.
req
));
AZ
(
pthread_cond_init
(
&
node
->
subreq
.
cond
,
NULL
)
);
node_mutate_prep
(
tree
,
node
);
node_mutate_lock
(
tree
,
node
,
T_SUBREQ
,
ST_DATA
);
node_mutate_unlock
(
tree
);
/*
* to be done in the other thread:
* - VDP_DeliverObj()
* - VDP_close()
*
* from vped_task():
* - req_fini()
*/
return
;
}
VSLdbg
(
req
,
"vped_deliver: ESI"
);
/* our caller, cnt_transmit(), releases the refs to boc and oc when we
* return, so in order to hand this request to the topreq thread, we
* need to gain one more
*/
node
->
subreq
.
req
=
req
;
node
->
subreq
.
boc
=
HSH_RefBoc
(
req
->
objcore
);
HSH_Ref
(
req
->
objcore
);
node
->
subreq
.
oc
=
req
->
objcore
;
VDP_Push
(
req
,
&
VDP_pesi_buf
,
pesi
);
push_vdps
(
req
,
vgzgz
,
gz
);
AN
(
parent
);
AZ
(
VDP_Push
(
req
,
&
vped_to_parent
,
parent
->
nexus
.
req
));
AZ
(
pthread_cond_init
(
&
node
->
subreq
.
cond
,
NULL
));
(
void
)
VDP_DeliverObj
(
req
);
node_mutate_lock
(
tree
,
node
,
T_SUBREQ
,
ST_DATA
);
node_mutate_unlock
(
tree
);
/*
* only close the pesi VDPs, the others are to run from topreq delivery
* to be done in the other thread:
* - VDP_DeliverObj()
* - VDP_close()
*
* from vped_task():
* - req_fini()
*/
vped_close_vdp
(
req
,
0
,
&
VDP_pesi
);
vped_close_vdp
(
req
,
0
,
&
VDP_pesi_buf
);
return
;
}
...
...
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