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
c493b6b8
Commit
c493b6b8
authored
Nov 14, 2009
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make the two "wrap-bytes" sections simpler and more similar.
parent
4e2a7e59
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
8 deletions
+7
-8
io.c
io.c
+7
-8
No files found.
io.c
View file @
c493b6b8
...
@@ -614,21 +614,20 @@ static char *perform_io(size_t needed, int flags)
...
@@ -614,21 +614,20 @@ static char *perform_io(size_t needed, int flags)
if
(
iobuf
.
raw_flushing_ends_before
if
(
iobuf
.
raw_flushing_ends_before
||
(
!
iobuf
.
msg
.
len
&&
iobuf
.
out
.
len
>
iobuf
.
out_empty_len
&&
!
(
flags
&
PIO_NEED_MSGROOM
)))
{
||
(
!
iobuf
.
msg
.
len
&&
iobuf
.
out
.
len
>
iobuf
.
out_empty_len
&&
!
(
flags
&
PIO_NEED_MSGROOM
)))
{
if
(
OUT_MULTIPLEXED
&&
!
iobuf
.
raw_flushing_ends_before
)
{
if
(
OUT_MULTIPLEXED
&&
!
iobuf
.
raw_flushing_ends_before
)
{
size_t
val
;
/* The iobuf.raw_flushing_ends_before value can point off the end
/* The iobuf.raw_flushing_ends_before value can point off the end
* of the iobuf.out buffer for a while, for easier subtracting. */
* of the iobuf.out buffer for a while, for easier subtracting. */
iobuf
.
raw_flushing_ends_before
=
iobuf
.
out
.
pos
+
iobuf
.
out
.
len
;
iobuf
.
raw_flushing_ends_before
=
iobuf
.
out
.
pos
+
iobuf
.
out
.
len
;
SIVAL
(
iobuf
.
out
.
buf
+
iobuf
.
raw_data_header_pos
,
0
,
SIVAL
(
iobuf
.
out
.
buf
+
iobuf
.
raw_data_header_pos
,
0
,
((
MPLEX_BASE
+
(
int
)
MSG_DATA
)
<<
24
)
+
iobuf
.
out
.
len
-
4
);
((
MPLEX_BASE
+
(
int
)
MSG_DATA
)
<<
24
)
+
iobuf
.
out
.
len
-
4
);
if
((
val
=
iobuf
.
out
.
size
-
iobuf
.
raw_data_header_pos
)
<
4
)
{
if
(
iobuf
.
raw_data_header_pos
+
4
>
iobuf
.
out
.
size
)
{
int
siz
=
(
int
)(
iobuf
.
raw_data_header_pos
+
4
-
iobuf
.
out
.
size
);
/* We used some of the overflow bytes, so move them. */
/* We used some of the overflow bytes, so move them. */
if
(
DEBUG_GTE
(
IO
,
4
))
{
if
(
DEBUG_GTE
(
IO
,
4
))
{
rprintf
(
FINFO
,
"[%s] wrap-bytes moved: %d (perform_io)
\n
"
,
rprintf
(
FINFO
,
"[%s] wrap-bytes moved: %d (perform_io)
\n
"
,
who_am_i
(),
(
int
)
val
);
who_am_i
(),
siz
);
}
}
memcpy
(
iobuf
.
out
.
buf
,
iobuf
.
out
.
buf
+
iobuf
.
out
.
size
,
4
-
val
);
memcpy
(
iobuf
.
out
.
buf
,
iobuf
.
out
.
buf
+
iobuf
.
out
.
size
,
siz
);
}
}
if
(
DEBUG_GTE
(
IO
,
1
))
{
if
(
DEBUG_GTE
(
IO
,
1
))
{
...
@@ -883,10 +882,10 @@ int send_msg(enum msgcode code, const char *buf, size_t len, int convert)
...
@@ -883,10 +882,10 @@ int send_msg(enum msgcode code, const char *buf, size_t len, int convert)
SIVAL
(
hdr
,
0
,
((
MPLEX_BASE
+
(
int
)
code
)
<<
24
)
+
len
);
SIVAL
(
hdr
,
0
,
((
MPLEX_BASE
+
(
int
)
code
)
<<
24
)
+
len
);
/* If the header used any overflow bytes, move them to the start. */
/* If the header used any overflow bytes, move them to the start. */
if
((
pos
=
hdr
+
4
-
iobuf
.
msg
.
buf
)
>
iobuf
.
msg
.
size
)
{
if
((
pos
=
hdr
+
4
-
iobuf
.
msg
.
buf
)
>
iobuf
.
msg
.
size
)
{
size_t
siz
=
pos
-
iobuf
.
msg
.
size
;
int
siz
=
(
int
)(
pos
-
iobuf
.
msg
.
size
)
;
if
(
DEBUG_GTE
(
IO
,
4
))
if
(
DEBUG_GTE
(
IO
,
4
))
rprintf
(
FINFO
,
"[%s] wrap-bytes moved: %d (send_msg)
\n
"
,
who_am_i
(),
(
int
)
siz
);
rprintf
(
FINFO
,
"[%s] wrap-bytes moved: %d (send_msg)
\n
"
,
who_am_i
(),
siz
);
memcpy
(
iobuf
.
msg
.
buf
,
hdr
+
4
-
siz
,
siz
);
memcpy
(
iobuf
.
msg
.
buf
,
iobuf
.
msg
.
buf
+
iobuf
.
msg
.
size
,
siz
);
}
}
if
(
want_debug
&&
convert
>
0
)
if
(
want_debug
&&
convert
>
0
)
...
...
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