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
0f30a816
Commit
0f30a816
authored
Jul 31, 2019
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove gotos
parent
b3eac3f0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
vdp_pesi.c
src/vdp_pesi.c
+15
-16
No files found.
src/vdp_pesi.c
View file @
0f30a816
...
...
@@ -2611,13 +2611,17 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
CHECK_OBJ_NOTNULL
(
parent
,
NODE_MAGIC
);
assert
(
parent
->
type
==
T_NEXUS
);
if
(
wantbody
==
0
)
goto
close
;
// XXX
if
(
wantbody
==
0
)
{
VDP_close
(
req
);
return
;
}
VSLdbgv
(
req
,
"vped_deliver: ObjGetLen=%lu"
,
ObjGetLen
(
req
->
wrk
,
req
->
objcore
));
if
(
boc
==
NULL
&&
ObjGetLen
(
req
->
wrk
,
req
->
objcore
)
==
0
)
goto
close
;
// XXX
if
(
boc
==
NULL
&&
ObjGetLen
(
req
->
wrk
,
req
->
objcore
)
==
0
)
{
VDP_close
(
req
);
return
;
}
is_esi
=
ObjHasAttr
(
req
->
wrk
,
req
->
objcore
,
OA_ESIDATA
);
is_final
=
(
req
->
objcore
->
flags
&
OC_F_FINAL
)
!=
0
;
...
...
@@ -2633,11 +2637,14 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
if
(
req
->
objcore
->
flags
&
OC_F_FAILED
)
{
/* No way of signalling errors in the middle of
the ESI body. Omit this ESI fragment. */
goto
close
;
// XXX
VDP_close
(
req
);
return
;
}
}
if
(
is_final
&&
!
is_esi
&&
!
use_thread_blocking
)
{
VSLdbg
(
req
,
"vped_deliver: T_NEXUS buffering no ESI"
);
VDP_Push
(
req
,
&
VDP_pesi_buf
,
pesi
);
AN
(
parent
);
XXXAZ
(
push_vdps
(
req
,
&
parent
->
nexus
.
gzip
));
...
...
@@ -2648,7 +2655,8 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
/* pesi_buf does not pesi_destroy() on fini */
req
->
transport_priv
=
NULL
;
pesi_destroy
(
&
pesi
);
goto
noesi
;
// XXX
vped_close_vdp
(
req
,
0
,
&
VDP_pesi_buf
);
return
;
}
else
if
(
is_final
&&
!
is_esi
)
{
VSLdbg
(
req
,
"vped_deliver: T_FINAL"
);
...
...
@@ -2726,27 +2734,18 @@ vped_deliver(struct req *req, struct boc *boc, int wantbody)
VSLdbg
(
req
,
"vped_deliver: ESI"
);
VDP_Push
(
req
,
&
VDP_pesi_buf
,
pesi
);
XXX
AZ
(
push_vdps
(
req
,
&
parent
->
nexus
.
gzip
));
AZ
(
push_vdps
(
req
,
&
parent
->
nexus
.
gzip
));
AN
(
parent
);
AZ
(
VDP_Push
(
req
,
&
vped_to_parent
,
parent
->
req
));
(
void
)
VDP_DeliverObj
(
req
);
/*
* was: VDP_close(req);
*
* only close the pesi VDPs, the others are to run from topreq delivery
*
* XXX cleanup
*/
vped_close_vdp
(
req
,
0
,
&
VDP_pesi
);
noesi:
vped_close_vdp
(
req
,
0
,
&
VDP_pesi_buf
);
out:
return
;
close:
VDP_close
(
req
);
goto
out
;
}
static
const
struct
transport
VPED_transport
=
{
...
...
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