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
04cd8789
Commit
04cd8789
authored
Jun 30, 2006
by
Wayne Davison
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle the --remove-sender-files option by sending MSG_SUCCESS for
any up-to-date file (non-dir).
parent
9578783a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
9 deletions
+23
-9
generator.c
generator.c
+23
-9
No files found.
generator.c
View file @
04cd8789
...
@@ -50,7 +50,7 @@ extern int delete_during;
...
@@ -50,7 +50,7 @@ extern int delete_during;
extern
int
delete_after
;
extern
int
delete_after
;
extern
int
module_id
;
extern
int
module_id
;
extern
int
ignore_errors
;
extern
int
ignore_errors
;
extern
int
remove_sen
t
_files
;
extern
int
remove_sen
der
_files
;
extern
int
delay_updates
;
extern
int
delay_updates
;
extern
int
update_only
;
extern
int
update_only
;
extern
int
ignore_existing
;
extern
int
ignore_existing
;
...
@@ -986,6 +986,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
...
@@ -986,6 +986,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
itemizing
,
itemizing
,
code
);
code
);
}
}
if
(
remove_sender_files
==
1
)
goto
return_with_success
;
return
;
return
;
}
}
}
}
...
@@ -1025,13 +1027,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
...
@@ -1025,13 +1027,10 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
rprintf
(
code
,
"%s -> %s
\n
"
,
fname
,
rprintf
(
code
,
"%s -> %s
\n
"
,
fname
,
file
->
u
.
link
);
file
->
u
.
link
);
}
}
if
(
remove_sent_files
&&
!
dry_run
)
{
char
numbuf
[
4
];
SIVAL
(
numbuf
,
0
,
ndx
);
send_msg
(
MSG_SUCCESS
,
numbuf
,
4
);
}
if
(
preserve_hard_links
&&
file
->
link_u
.
links
)
if
(
preserve_hard_links
&&
file
->
link_u
.
links
)
hard_link_cluster
(
file
,
ndx
,
itemizing
,
code
);
hard_link_cluster
(
file
,
ndx
,
itemizing
,
code
);
if
(
remove_sender_files
)
goto
return_with_success
;
}
}
#endif
#endif
return
;
return
;
...
@@ -1085,6 +1084,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
...
@@ -1085,6 +1084,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
hard_link_cluster
(
file
,
ndx
,
hard_link_cluster
(
file
,
ndx
,
itemizing
,
code
);
itemizing
,
code
);
}
}
if
(
remove_sender_files
==
1
)
goto
return_with_success
;
}
}
}
else
{
}
else
{
if
(
itemizing
)
if
(
itemizing
)
...
@@ -1092,6 +1093,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
...
@@ -1092,6 +1093,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
set_file_attrs
(
fname
,
file
,
&
st
,
maybe_ATTRS_REPORT
);
set_file_attrs
(
fname
,
file
,
&
st
,
maybe_ATTRS_REPORT
);
if
(
preserve_hard_links
&&
file
->
link_u
.
links
)
if
(
preserve_hard_links
&&
file
->
link_u
.
links
)
hard_link_cluster
(
file
,
ndx
,
itemizing
,
code
);
hard_link_cluster
(
file
,
ndx
,
itemizing
,
code
);
if
(
remove_sender_files
==
1
)
goto
return_with_success
;
}
}
return
;
return
;
}
}
...
@@ -1146,8 +1149,11 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
...
@@ -1146,8 +1149,11 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
if
(
statret
!=
0
&&
basis_dir
[
0
]
!=
NULL
)
{
if
(
statret
!=
0
&&
basis_dir
[
0
]
!=
NULL
)
{
int
j
=
try_dests_reg
(
file
,
fname
,
ndx
,
fnamecmpbuf
,
&
st
,
int
j
=
try_dests_reg
(
file
,
fname
,
ndx
,
fnamecmpbuf
,
&
st
,
itemizing
,
maybe_ATTRS_REPORT
,
code
);
itemizing
,
maybe_ATTRS_REPORT
,
code
);
if
(
j
==
-
2
)
if
(
j
==
-
2
)
{
if
(
remove_sender_files
==
1
)
goto
return_with_success
;
return
;
return
;
}
if
(
j
!=
-
1
)
{
if
(
j
!=
-
1
)
{
fnamecmp
=
fnamecmpbuf
;
fnamecmp
=
fnamecmpbuf
;
fnamecmp_type
=
j
;
fnamecmp_type
=
j
;
...
@@ -1213,6 +1219,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
...
@@ -1213,6 +1219,14 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
set_file_attrs
(
fname
,
file
,
&
st
,
maybe_ATTRS_REPORT
);
set_file_attrs
(
fname
,
file
,
&
st
,
maybe_ATTRS_REPORT
);
if
(
preserve_hard_links
&&
file
->
link_u
.
links
)
if
(
preserve_hard_links
&&
file
->
link_u
.
links
)
hard_link_cluster
(
file
,
ndx
,
itemizing
,
code
);
hard_link_cluster
(
file
,
ndx
,
itemizing
,
code
);
if
(
remove_sender_files
!=
1
)
return
;
return_with_success:
if
(
!
dry_run
)
{
char
numbuf
[
4
];
SIVAL
(
numbuf
,
0
,
ndx
);
send_msg
(
MSG_SUCCESS
,
numbuf
,
4
);
}
return
;
return
;
}
}
...
@@ -1285,8 +1299,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
...
@@ -1285,8 +1299,8 @@ static void recv_generator(char *fname, struct file_struct *file, int ndx,
rprintf
(
FINFO
,
"generating and sending sums for %d
\n
"
,
ndx
);
rprintf
(
FINFO
,
"generating and sending sums for %d
\n
"
,
ndx
);
notify_others:
notify_others:
if
(
remove_sen
t
_files
&&
!
delay_updates
&&
!
phase
)
if
(
remove_sen
der
_files
&&
!
delay_updates
&&
!
phase
)
increment_active_files
(
ndx
,
itemizing
,
code
);
increment_active_files
(
ndx
,
itemizing
,
code
);
write_int
(
f_out
,
ndx
);
write_int
(
f_out
,
ndx
);
if
(
itemizing
)
{
if
(
itemizing
)
{
int
iflags
=
ITEM_TRANSFER
;
int
iflags
=
ITEM_TRANSFER
;
...
...
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