Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libvmod-zipflow
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
libvmod-zipflow
Commits
31770081
Unverified
Commit
31770081
authored
Sep 22, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename zfr_iter -> zfr_iter_ws
parent
118e1c42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
8 deletions
+9
-8
vmod_zipflow.c
src/vmod_zipflow.c
+2
-2
zfr_iter.c
src/zfr_iter.c
+6
-5
zfr_iter.h
src/zfr_iter.h
+1
-1
No files found.
src/vmod_zipflow.c
View file @
31770081
...
...
@@ -543,7 +543,7 @@ zft_iter_req_body(struct zipflow_top *zft)
if
(
zft
->
body_req
)
{
(
void
)
VRB_Iterate
(
req
->
wrk
,
req
->
vsl
,
req
,
zfr_iter
,
(
void
*
)
zis
);
zfr_iter
_ws
,
(
void
*
)
zis
);
zfr_iter_fini
(
zis
);
}
}
...
...
@@ -764,7 +764,7 @@ vdp_zipflow_bytes(struct vdp_ctx *vdc, enum vdp_action act, void **priv,
zft
=
zfr
->
top
;
if
(
zft
->
zis
!=
NULL
)
{
r
=
zfr_iter
(
zft
->
zis
,
(
act
==
VDP_END
)
?
OBJ_ITER_END
:
0
,
r
=
zfr_iter
_ws
(
zft
->
zis
,
(
act
==
VDP_END
)
?
OBJ_ITER_END
:
0
,
ptr
,
len
);
}
else
...
...
src/zfr_iter.c
View file @
31770081
...
...
@@ -73,8 +73,9 @@ static const char *DBG_begin;
#define DBG_VALID(p) (void)0
#endif
/* iterate over whitespace separated input */
int
zfr_iter
(
void
*
priv
,
unsigned
flush
,
const
void
*
ptr
,
ssize_t
alen
)
zfr_iter
_ws
(
void
*
priv
,
unsigned
flush
,
const
void
*
ptr
,
ssize_t
alen
)
{
const
char
*
pp
,
*
p
,
*
e
,
*
h
,
*
u
;
struct
zfr_iter_s
*
zis
;
...
...
@@ -197,7 +198,7 @@ zfr_iter_fini(struct zfr_iter_s *zis)
CHECK_OBJ_NOTNULL
(
zis
,
ZFR_ITER_MAGIC
);
if
(
zis
->
len
>
0
&&
zis
->
end_seen
==
0
)
(
void
)
zfr_iter
(
zis
,
OBJ_ITER_END
,
""
,
(
ssize_t
)
0
);
(
void
)
zfr_iter
_ws
(
zis
,
OBJ_ITER_END
,
""
,
(
ssize_t
)
0
);
free
(
zis
->
buf
);
zis
->
buf
=
NULL
;
zis
->
len
=
0
;
...
...
@@ -312,9 +313,9 @@ t_steps(const struct expect *want, unsigned n, const char *s)
for
(
t
=
s
,
l
=
strlen
(
t
);
l
>
step
;
l
-=
step
,
t
+=
step
)
zfr_iter
(
zis
,
0
,
t
,
step
);
zfr_iter
_ws
(
zis
,
0
,
t
,
step
);
AN
(
l
);
zfr_iter
(
zis
,
OBJ_ITER_END
,
t
,
l
);
zfr_iter
_ws
(
zis
,
OBJ_ITER_END
,
t
,
l
);
AN
(
zis
->
end_seen
);
assert
(
wp
->
count
==
n
);
}
...
...
@@ -338,7 +339,7 @@ main(void) {
INIT_OBJ
(
zis
,
ZFR_ITER_MAGIC
);
zis
->
priv
=
NULL
;
zis
->
func
=
cb_not
;
zfr_iter
(
zis
,
0
,
""
,
0
);
zfr_iter
_ws
(
zis
,
0
,
""
,
0
);
n
=
0
;
*
s
=
'\0'
;
...
...
src/zfr_iter.h
View file @
31770081
...
...
@@ -42,5 +42,5 @@ struct zfr_iter_s {
};
void
zfr_iter_fini
(
struct
zfr_iter_s
*
zis
);
int
zfr_iter
(
void
*
,
unsigned
flush
,
int
zfr_iter
_ws
(
void
*
,
unsigned
flush
,
const
void
*
ptr
,
ssize_t
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