aboutsummaryrefslogtreecommitdiffstats
path: root/log.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2013-11-28 11:03:48 -0800
committerWayne Davison <wayned@samba.org>2013-11-28 11:13:05 -0800
commit32540aa09109f5f95aac2927928abde4a9ce7b41 (patch)
tree6a22a364c496d3d4dbd11cf967d339ab5b855e7d /log.c
parent836e0c5df418a9fd0744e9101f05245322f8668a (diff)
downloadandroid_external_rsync-32540aa09109f5f95aac2927928abde4a9ce7b41.tar.gz
android_external_rsync-32540aa09109f5f95aac2927928abde4a9ce7b41.tar.bz2
android_external_rsync-32540aa09109f5f95aac2927928abde4a9ce7b41.zip
Tweak log_delete() to send MSG_DELETED more.
If the client is the sender and it is wanting to log deletes, the current generator code neglects to send MSG_DELETED to the client side unless some delete verbosity is enabled. With this new version on the generator side, the logfile will now mention deletes, even if the sending (client) side is an older rsync. Fixes bug 10182.
Diffstat (limited to 'log.c')
-rw-r--r--log.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/log.c b/log.c
index b1ed320d..8e57b253 100644
--- a/log.c
+++ b/log.c
@@ -846,13 +846,13 @@ void log_delete(const char *fname, int mode)
x.file.mode = mode;
- if (!INFO_GTE(DEL, 1) && !stdout_format)
- ;
- else if (am_server && protocol_version >= 29 && len < MAXPATHLEN) {
+ if (am_server && protocol_version >= 29 && len < MAXPATHLEN) {
if (S_ISDIR(mode))
len++; /* directories include trailing null */
send_msg(MSG_DELETED, fname, len, am_generator);
- } else {
+ } else if (!INFO_GTE(DEL, 1) && !stdout_format)
+ ;
+ else {
fmt = stdout_format_has_o_or_i ? stdout_format : "deleting %n";
log_formatted(FCLIENT, fmt, "del.", &x.file, fname, ITEM_DELETED, NULL);
}