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
cabb69f2
Unverified
Commit
cabb69f2
authored
Jun 12, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor: centralize T_NEXUS init
parent
96a7987e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
3 deletions
+12
-3
node.c
src/node.c
+12
-1
vdp_pesi.c
src/vdp_pesi.c
+0
-2
No files found.
src/node.c
View file @
cabb69f2
...
...
@@ -234,8 +234,19 @@ node_new(struct pesi *pesi, enum n_type type, enum n_state state)
AN
(
node
);
node
->
type
=
type
;
node
->
state
=
state
;
if
(
type
==
T_NEXUS
)
switch
(
type
)
{
case
T_NEXUS
:
VSTAILQ_INIT
(
&
node
->
nexus
.
children
);
node
->
nexus
.
gzip
.
magic
=
NEXUS_GZIP_MAGIC
;
break
;
case
T_DATA
:
case
T_CRC
:
case
T_SUBREQ
:
break
;
default:
WRONG
(
"node type in node_new"
);
}
return
(
node
);
}
...
...
src/vdp_pesi.c
View file @
cabb69f2
...
...
@@ -639,7 +639,6 @@ root_node_new(struct pesi *pesi, struct req *req)
root_node
=
node_new
(
pesi
,
T_NEXUS
,
ST_PRIVATE
);
CHECK_OBJ_NOTNULL
(
root_node
,
NODE_MAGIC
);
root_node
->
nexus
.
req
=
req
;
root_node
->
nexus
.
gzip
.
magic
=
NEXUS_GZIP_MAGIC
;
root_node
->
nexus
.
npending_private
=
1
;
return
(
root_node
);
...
...
@@ -992,7 +991,6 @@ vdp_pesi_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
AZ
(
child
);
child
=
node_new
(
pesi
,
T_NEXUS
,
ST_PRIVATE
);
CHECK_OBJ_NOTNULL
(
child
,
NODE_MAGIC
);
child
->
nexus
.
gzip
.
magic
=
NEXUS_GZIP_MAGIC
;
node_insert
(
tree
,
node
,
child
);
...
...
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