Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liblongpath-rsync
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
liblongpath
liblongpath-rsync
Commits
b82d8c9d
Commit
b82d8c9d
authored
Nov 14, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tweaked sizing checks in perform_io().
parent
75ea8459
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
io.c
io.c
+8
-6
No files found.
io.c
View file @
b82d8c9d
...
...
@@ -541,8 +541,8 @@ static char *perform_io(size_t needed, int flags)
if
(
DEBUG_GTE
(
IO
,
3
))
{
rprintf
(
FINFO
,
"[%s] perform_io(%ld, outroom) needs to flush %ld
\n
"
,
who_am_i
(),
(
long
)
needed
,
iobuf
.
out
.
len
>
iobuf
.
out
.
size
-
needed
?
(
long
)
iobuf
.
out
.
len
-
(
iobuf
.
out
.
size
-
needed
)
:
0L
);
iobuf
.
out
.
len
+
needed
>
iobuf
.
out
.
size
?
(
long
)
(
iobuf
.
out
.
len
+
needed
-
iobuf
.
out
.
size
)
:
0L
);
}
break
;
...
...
@@ -557,8 +557,8 @@ static char *perform_io(size_t needed, int flags)
if
(
DEBUG_GTE
(
IO
,
3
))
{
rprintf
(
FINFO
,
"[%s] perform_io(%ld, msgroom) needs to flush %ld
\n
"
,
who_am_i
(),
(
long
)
needed
,
iobuf
.
out
.
len
>
iobuf
.
msg
.
size
-
needed
?
(
long
)
iobuf
.
out
.
len
-
(
iobuf
.
msg
.
size
-
needed
)
:
0L
);
iobuf
.
msg
.
len
+
needed
>
iobuf
.
msg
.
size
?
(
long
)
(
iobuf
.
msg
.
len
+
needed
-
iobuf
.
msg
.
size
)
:
0L
);
}
break
;
...
...
@@ -578,11 +578,13 @@ static char *perform_io(size_t needed, int flags)
goto
double_break
;
break
;
case
PIO_NEED_OUTROOM
:
if
(
iobuf
.
out
.
len
<=
iobuf
.
out
.
size
-
needed
)
/* Note that iobuf.out_empty_len doesn't factor into this check
* because iobuf.out.len already holds any needed header len. */
if
(
iobuf
.
out
.
len
+
needed
<=
iobuf
.
out
.
size
)
goto
double_break
;
break
;
case
PIO_NEED_MSGROOM
:
if
(
iobuf
.
msg
.
len
<=
iobuf
.
msg
.
size
-
needed
)
if
(
iobuf
.
msg
.
len
+
needed
<=
iobuf
.
msg
.
size
)
goto
double_break
;
break
;
}
...
...
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