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
c1659c79
Commit
c1659c79
authored
Aug 31, 2001
by
Martin Pool
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean up from rsync+ patch; fix compiler warning.
parent
4a7cb3e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
34 deletions
+32
-34
sender.c
sender.c
+32
-34
No files found.
sender.c
View file @
c1659c79
...
...
@@ -83,9 +83,9 @@ static struct sum_struct *receive_sums(int f)
void
send_files
(
struct
file_list
*
flist
,
int
f_out
,
int
f_in
)
{
int
fd
;
int
fd
=
-
1
;
struct
sum_struct
*
s
;
struct
map_struct
*
buf
;
struct
map_struct
*
buf
=
NULL
;
STRUCT_STAT
st
;
char
fname
[
MAXPATHLEN
];
int
i
;
...
...
@@ -168,44 +168,42 @@ void send_files(struct file_list *flist,int f_out,int f_in)
}
if
(
!
read_batch
)
{
fd
=
do_open
(
fname
,
O_RDONLY
,
0
);
if
(
fd
==
-
1
)
{
io_error
=
1
;
rprintf
(
FERROR
,
"send_files failed to open %s: %s
\n
"
,
fname
,
strerror
(
errno
));
free_sums
(
s
);
continue
;
}
fd
=
do_open
(
fname
,
O_RDONLY
,
0
);
if
(
fd
==
-
1
)
{
io_error
=
1
;
rprintf
(
FERROR
,
"send_files failed to open %s: %s
\n
"
,
fname
,
strerror
(
errno
));
free_sums
(
s
);
continue
;
}
/* map the local file */
if
(
do_fstat
(
fd
,
&
st
)
!=
0
)
{
io_error
=
1
;
rprintf
(
FERROR
,
"fstat failed : %s
\n
"
,
strerror
(
errno
));
free_sums
(
s
);
close
(
fd
);
return
;
}
/* map the local file */
if
(
do_fstat
(
fd
,
&
st
)
!=
0
)
{
io_error
=
1
;
rprintf
(
FERROR
,
"fstat failed : %s
\n
"
,
strerror
(
errno
));
free_sums
(
s
);
close
(
fd
);
return
;
}
if
(
st
.
st_size
>
0
)
{
buf
=
map_file
(
fd
,
st
.
st_size
);
}
else
{
buf
=
NULL
;
}
if
(
st
.
st_size
>
0
)
{
buf
=
map_file
(
fd
,
st
.
st_size
);
}
else
{
buf
=
NULL
;
}
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"send_files mapped %s of size %.0f
\n
"
,
fname
,(
double
)
st
.
st_size
);
}
if
(
verbose
>
2
)
rprintf
(
FINFO
,
"send_files mapped %s of size %.0f
\n
"
,
fname
,(
double
)
st
.
st_size
);
if
(
!
read_batch
)
{
/* dw */
write_int
(
f_out
,
i
);
write_int
(
f_out
,
i
);
if
(
write_batch
)
write_batch_delta_file
((
char
*
)
&
i
,
sizeof
(
i
));
if
(
write_batch
)
write_batch_delta_file
((
char
*
)
&
i
,
sizeof
(
i
));
write_int
(
f_out
,
s
->
count
);
write_int
(
f_out
,
s
->
n
);
write_int
(
f_out
,
s
->
remainder
);
write_int
(
f_out
,
s
->
count
);
write_int
(
f_out
,
s
->
n
);
write_int
(
f_out
,
s
->
remainder
);
}
if
(
verbose
>
2
)
...
...
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