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
044ccbaa
Commit
044ccbaa
authored
Jun 30, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The remove_sent_files var was renamed to remove_sender_files.
parent
841d9436
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
15 deletions
+13
-15
io.c
io.c
+4
-4
main.c
main.c
+4
-3
receiver.c
receiver.c
+3
-3
sender.c
sender.c
+2
-5
No files found.
io.c
View file @
044ccbaa
...
...
@@ -46,7 +46,7 @@ extern int read_batch;
extern
int
csum_length
;
extern
int
checksum_seed
;
extern
int
protocol_version
;
extern
int
remove_sen
t
_files
;
extern
int
remove_sen
der
_files
;
extern
int
preserve_hard_links
;
extern
char
*
filesfrom_host
;
extern
struct
stats
stats
;
...
...
@@ -257,7 +257,7 @@ static void read_msg_fd(void)
exit_cleanup
(
RERR_STREAMIO
);
}
read_loop
(
fd
,
buf
,
4
);
if
(
remove_sen
t
_files
)
if
(
remove_sen
der
_files
)
decrement_active_files
(
IVAL
(
buf
,
0
));
flist_ndx_push
(
&
redo_list
,
IVAL
(
buf
,
0
));
break
;
...
...
@@ -275,7 +275,7 @@ static void read_msg_fd(void)
exit_cleanup
(
RERR_STREAMIO
);
}
read_loop
(
fd
,
buf
,
len
);
if
(
remove_sen
t
_files
)
{
if
(
remove_sen
der
_files
)
{
decrement_active_files
(
IVAL
(
buf
,
0
));
send_msg
(
MSG_SUCCESS
,
buf
,
len
);
}
...
...
@@ -311,7 +311,7 @@ static void read_msg_fd(void)
}
/* This is used by the generator to limit how many file transfers can
* be active at once when --remove-sen
t
-files is specified. Without
* be active at once when --remove-sen
der
-files is specified. Without
* this, sender-side deletions were mostly happening at the end. */
void
increment_active_files
(
int
ndx
,
int
itemizing
,
enum
logcode
code
)
{
...
...
main.c
View file @
044ccbaa
...
...
@@ -35,7 +35,7 @@ extern int am_sender;
extern
int
am_generator
;
extern
int
am_daemon
;
extern
int
blocking_io
;
extern
int
remove_sen
t
_files
;
extern
int
remove_sen
der
_files
;
extern
int
daemon_over_rsh
;
extern
int
need_messages_from_generator
;
extern
int
kluge_around_eof
;
...
...
@@ -614,9 +614,10 @@ static void do_server_sender(int f_in, int f_out, int argc, char *argv[])
exit_cleanup
(
RERR_SYNTAX
);
return
;
}
if
(
am_daemon
&&
lp_read_only
(
module_id
)
&&
remove_sen
t
_files
)
{
if
(
am_daemon
&&
lp_read_only
(
module_id
)
&&
remove_sen
der
_files
)
{
rprintf
(
FERROR
,
"ERROR: --remove-sent-files cannot be used with a read-only module
\n
"
);
"ERROR: --remove-%s-files cannot be used with a read-only module
\n
"
,
remove_sender_files
==
1
?
"sender"
:
"sent"
);
exit_cleanup
(
RERR_SYNTAX
);
return
;
}
...
...
receiver.c
View file @
044ccbaa
...
...
@@ -40,7 +40,7 @@ extern int preserve_perms;
extern
int
basis_dir_cnt
;
extern
int
make_backups
;
extern
int
cleanup_got_literal
;
extern
int
remove_sen
t
_files
;
extern
int
remove_sen
der
_files
;
extern
int
append_mode
;
extern
int
sparse_files
;
extern
int
keep_partial
;
...
...
@@ -296,7 +296,7 @@ static void handle_delayed_updates(struct file_list *flist, char *local_name)
"rename failed for %s (from %s)"
,
full_fname
(
fname
),
partialptr
);
}
else
{
if
(
remove_sen
t
_files
if
(
remove_sen
der
_files
||
(
preserve_hard_links
&&
file
->
link_u
.
links
))
{
SIVAL
(
numbuf
,
0
,
i
);
...
...
@@ -644,7 +644,7 @@ int recv_files(int f_in, struct file_list *flist, char *local_name)
cleanup_disable
();
if
(
recv_ok
>
0
)
{
if
(
remove_sen
t
_files
if
(
remove_sen
der
_files
||
(
preserve_hard_links
&&
file
->
link_u
.
links
))
{
SIVAL
(
numbuf
,
0
,
i
);
send_msg
(
MSG_SUCCESS
,
numbuf
,
4
);
...
...
sender.c
View file @
044ccbaa
...
...
@@ -34,7 +34,7 @@ extern int append_mode;
extern
int
io_error
;
extern
int
allowed_lull
;
extern
int
protocol_version
;
extern
int
remove_sen
t
_files
;
extern
int
remove_sen
der
_files
;
extern
int
updating_basis_file
;
extern
int
make_backups
;
extern
int
do_progress
;
...
...
@@ -128,16 +128,13 @@ void successful_send(int ndx)
return
;
file
=
the_file_list
->
files
[
ndx
];
/* The generator might tell us about symlinks we didn't send. */
if
(
!
(
file
->
flags
&
FLAG_SENT
)
&&
!
S_ISLNK
(
file
->
mode
))
return
;
if
(
file
->
dir
.
root
)
{
offset
=
stringjoin
(
fname
,
sizeof
fname
,
file
->
dir
.
root
,
"/"
,
NULL
);
}
else
offset
=
0
;
f_name
(
file
,
fname
+
offset
);
if
(
remove_sen
t
_files
&&
do_unlink
(
fname
)
==
0
&&
verbose
>
1
)
if
(
remove_sen
der
_files
&&
do_unlink
(
fname
)
==
0
&&
verbose
>
1
)
rprintf
(
FINFO
,
"sender removed %s
\n
"
,
fname
+
offset
);
}
...
...
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