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
89e540e6
Commit
89e540e6
authored
Jul 29, 2004
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
One more inplace code tweak.
parent
fab65a5b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
8 deletions
+5
-8
receiver.c
receiver.c
+5
-8
No files found.
receiver.c
View file @
89e540e6
...
@@ -214,7 +214,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
...
@@ -214,7 +214,7 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
struct
sum_struct
sum
;
struct
sum_struct
sum
;
unsigned
int
len
;
unsigned
int
len
;
OFF_T
offset
=
0
;
OFF_T
offset
=
0
;
OFF_T
offset2
,
seekto
=
0
;
OFF_T
offset2
;
char
*
data
;
char
*
data
;
int
i
;
int
i
;
char
*
map
=
NULL
;
char
*
map
=
NULL
;
...
@@ -276,19 +276,16 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
...
@@ -276,19 +276,16 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
}
}
if
(
inplace
)
{
if
(
inplace
)
{
if
(
offset
==
offset2
)
{
if
(
offset
==
offset2
&&
fd
!=
-
1
)
{
seekto
=
offset
+=
len
;
continue
;
}
if
(
seekto
&&
fd
!=
-
1
)
{
flush_write_file
(
fd
);
flush_write_file
(
fd
);
if
(
do_lseek
(
fd
,
seekto
,
SEEK_SET
)
!=
seekto
)
{
offset
+=
len
;
if
(
do_lseek
(
fd
,
len
,
SEEK_CUR
)
!=
offset
)
{
rsyserr
(
FERROR
,
errno
,
rsyserr
(
FERROR
,
errno
,
"lseek failed on %s"
,
"lseek failed on %s"
,
full_fname
(
fname
));
full_fname
(
fname
));
exit_cleanup
(
RERR_FILEIO
);
exit_cleanup
(
RERR_FILEIO
);
}
}
seekto
=
0
;
continue
;
}
}
}
}
if
(
fd
!=
-
1
&&
write_file
(
fd
,
map
,
len
)
!=
(
int
)
len
)
{
if
(
fd
!=
-
1
&&
write_file
(
fd
,
map
,
len
)
!=
(
int
)
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