Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
slash
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
slash
Commits
3fccc602
Unverified
Commit
3fccc602
authored
Nov 07, 2023
by
Nils Goroll
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fellow_stream_f(): Improve comment and assertion
to make clear that we understand exactly what is happening.
parent
a1dbf0fe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
fellow_storage.c
src/fellow_storage.c
+9
-4
No files found.
src/fellow_storage.c
View file @
3fccc602
...
...
@@ -754,9 +754,6 @@ fellow_stream_f(void *priv, unsigned flush, const void *ptr, ssize_t len)
assert
(
fs
->
available
>=
fs
->
written
);
l
=
vmin_t
(
ssize_t
,
len
,
fs
->
available
-
fs
->
written
);
if
(
flush
&
OBJ_ITER_END
)
assert
(
l
<=
len
);
do
{
r
=
fs
->
func
(
fs
->
priv
,
flush
,
p
,
l
);
if
(
r
)
...
...
@@ -772,7 +769,15 @@ fellow_stream_f(void *priv, unsigned flush, const void *ptr, ssize_t len)
assert
(
fs
->
available
>=
fs
->
written
);
l
=
vmin_t
(
ssize_t
,
len
,
fs
->
available
-
fs
->
written
);
}
while
(
l
>
0
);
// XXX len > 0 ?
}
while
(
l
>
0
);
/*
* can only have unsent data if the at the last segment and it was
* FCS_BUSY, so len is the allocation size, not the used size
*/
if
(
len
>
0
)
assert
(
flush
&
OBJ_ITER_END
);
fs
->
checkpoint
=
fs
->
written
;
return
(
r
);
}
...
...
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