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
2234c602
Unverified
Commit
2234c602
authored
Jan 02, 2021
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
polish
parent
5c6f8323
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
14 deletions
+16
-14
node.c
src/node.c
+16
-14
No files found.
src/node.c
View file @
2234c602
...
@@ -518,7 +518,7 @@ set_closed(struct bytes_tree *tree, struct node *node, const struct worker *wrk)
...
@@ -518,7 +518,7 @@ set_closed(struct bytes_tree *tree, struct node *node, const struct worker *wrk)
* restore the original subreq state and take care that we do not mess up flags,
* restore the original subreq state and take care that we do not mess up flags,
* objcore etc
* objcore etc
*/
*/
static
void
static
struct
req
*
subreq_fixup_oc
(
struct
node
*
node
)
subreq_fixup_oc
(
struct
node
*
node
)
{
{
struct
req
*
subreq
;
struct
req
*
subreq
;
...
@@ -541,9 +541,11 @@ subreq_fixup_oc(struct node *node)
...
@@ -541,9 +541,11 @@ subreq_fixup_oc(struct node *node)
TAKE_OBJ_NOTNULL
(
subreq
->
objcore
,
&
node
->
subreq
.
oc
,
TAKE_OBJ_NOTNULL
(
subreq
->
objcore
,
&
node
->
subreq
.
oc
,
OBJCORE_MAGIC
);
OBJCORE_MAGIC
);
}
}
return
(
subreq
);
}
}
static
void
static
struct
req
*
subreq_fixup
(
struct
node
*
node
,
struct
req
*
req
)
subreq_fixup
(
struct
node
*
node
,
struct
req
*
req
)
{
{
struct
req
*
subreq
;
struct
req
*
subreq
;
...
@@ -553,10 +555,7 @@ subreq_fixup(struct node *node, struct req *req)
...
@@ -553,10 +555,7 @@ subreq_fixup(struct node *node, struct req *req)
AN
(
node
->
subreq
.
done
);
AN
(
node
->
subreq
.
done
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
CHECK_OBJ_NOTNULL
(
req
,
REQ_MAGIC
);
subreq
=
node
->
subreq
.
req
;
subreq
=
subreq_fixup_oc
(
node
);
CHECK_OBJ_NOTNULL
(
subreq
,
REQ_MAGIC
);
subreq_fixup_oc
(
node
);
if
(
subreq
->
wrk
!=
NULL
)
if
(
subreq
->
wrk
!=
NULL
)
assert
(
subreq
->
wrk
==
req
->
wrk
);
assert
(
subreq
->
wrk
==
req
->
wrk
);
...
@@ -567,6 +566,8 @@ subreq_fixup(struct node *node, struct req *req)
...
@@ -567,6 +566,8 @@ subreq_fixup(struct node *node, struct req *req)
assert
(
subreq
->
top
->
topreq
==
req
);
assert
(
subreq
->
top
->
topreq
==
req
);
else
else
subreq
->
top
->
topreq
=
req
;
subreq
->
top
->
topreq
=
req
;
return
(
subreq
);
}
}
/* ------------------------------------------------------------
/* ------------------------------------------------------------
...
@@ -623,7 +624,7 @@ fini_subreq(const struct vdp_ctx *vdx, struct node *node)
...
@@ -623,7 +624,7 @@ fini_subreq(const struct vdp_ctx *vdx, struct node *node)
return
;
return
;
}
}
subreq_fixup_oc
(
node
);
(
void
)
subreq_fixup_oc
(
node
);
TAKE_OBJ_NOTNULL
(
subreq
,
&
node
->
subreq
.
req
,
REQ_MAGIC
);
TAKE_OBJ_NOTNULL
(
subreq
,
&
node
->
subreq
.
req
,
REQ_MAGIC
);
if
(
node
->
subreq
.
boc
)
if
(
node
->
subreq
.
boc
)
...
@@ -697,8 +698,9 @@ static int
...
@@ -697,8 +698,9 @@ static int
push_subreq
(
struct
req
*
req
,
struct
bytes_tree
*
tree
,
push_subreq
(
struct
req
*
req
,
struct
bytes_tree
*
tree
,
struct
node
*
node
,
const
struct
node
*
next
)
struct
node
*
node
,
const
struct
node
*
next
)
{
{
assert
(
node
->
type
==
T_SUBREQ
)
;
struct
req
*
subreq
;
assert
(
node
->
type
==
T_SUBREQ
);
(
void
)
next
;
(
void
)
next
;
if
(
node
->
subreq
.
done
==
0
)
{
if
(
node
->
subreq
.
done
==
0
)
{
...
@@ -710,17 +712,17 @@ push_subreq(struct req *req, struct bytes_tree *tree,
...
@@ -710,17 +712,17 @@ push_subreq(struct req *req, struct bytes_tree *tree,
Lck_Unlock
(
&
tree
->
tree_lock
);
Lck_Unlock
(
&
tree
->
tree_lock
);
}
}
subreq_fixup
(
node
,
req
);
subreq
=
subreq
_fixup
(
node
,
req
);
AZ
(
node
->
subreq
.
req
->
objcore
->
flags
&
OC_F_FINAL
);
AZ
(
sub
req
->
objcore
->
flags
&
OC_F_FINAL
);
VSLdbg
(
vdx
,
"DeliverObj from top"
);
VSLdbg
(
vdx
,
"DeliverObj from top"
);
/*
/*
* XXX how should we handle a failed subreq?
* XXX how should we handle a failed subreq?
* https://github.com/varnishcache/varnish-cache/issues/3264
* https://github.com/varnishcache/varnish-cache/issues/3264
*/
*/
(
void
)
VDP_DeliverObj
(
node
->
subreq
.
req
->
vdc
,
node
->
subreq
.
req
->
objcore
);
(
void
)
VDP_DeliverObj
(
subreq
->
vdc
,
sub
req
->
objcore
);
node
->
subreq
.
req
->
acct
.
resp_bodybytes
+=
VDP_Close
(
node
->
subreq
.
req
->
vdc
);
subreq
->
acct
.
resp_bodybytes
+=
VDP_Close
(
sub
req
->
vdc
);
// fini_subreq() happening later
// fini_subreq() happening later
...
@@ -817,7 +819,6 @@ push_data(struct vdp_ctx *vdx, struct bytes_tree *tree,
...
@@ -817,7 +819,6 @@ push_data(struct vdp_ctx *vdx, struct bytes_tree *tree,
assert
(
node
->
type
==
T_DATA
);
assert
(
node
->
type
==
T_DATA
);
(
void
)
tree
;
(
void
)
tree
;
(
void
)
vdx
;
AN
(
node
->
parent
);
AN
(
node
->
parent
);
assert
(
node
->
parent
->
type
==
T_NEXUS
);
assert
(
node
->
parent
->
type
==
T_NEXUS
);
...
@@ -837,7 +838,8 @@ push_data(struct vdp_ctx *vdx, struct bytes_tree *tree,
...
@@ -837,7 +838,8 @@ push_data(struct vdp_ctx *vdx, struct bytes_tree *tree,
if
(
p
==
NULL
||
node
->
data
.
len
==
0
)
if
(
p
==
NULL
||
node
->
data
.
len
==
0
)
return
(
0
);
return
(
0
);
return
(
VDP_bytes
(
node
->
parent
->
nexus
.
req
->
vdc
,
act
,
p
,
node
->
data
.
len
));
vdx
=
node
->
parent
->
nexus
.
req
->
vdc
;
return
(
VDP_bytes
(
vdx
,
act
,
p
,
node
->
data
.
len
));
}
}
/*
/*
...
...
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