The Samba-Bugzilla – Attachment 7178 Details for
Bug 8659
link-by-hash.diff: Fix error when running without --link-by-hash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Fix error when running without --link-by-hash
0001-Fix-error-when-running-without-link-by-hash.patch (text/plain), 1.34 KB, created by
Chris Dunlop
on 2011-12-14 03:47:10 UTC
(
hide
)
Description:
Fix error when running without --link-by-hash
Filename:
MIME Type:
Creator:
Chris Dunlop
Created:
2011-12-14 03:47:10 UTC
Size:
1.34 KB
patch
obsolete
>From edbcdc48f28a257cf862448057f411f0b2a313b2 Mon Sep 17 00:00:00 2001 >From: Chris Dunlop <chris@onthe.net.au> >Date: Wed, 14 Dec 2011 14:28:39 +1100 >Subject: [PATCH] Fix error when running without --link-by-hash > >Don't pass F_SUM(file) into receive_data() if not using --link-by-hash. > >When running without --link-by-hash (and without --checksum), F_SUM(file) >isn't allocated. However this location was being unconditionally passed into >receive_data() which would then write into it, stamping on whatever happened >to be there. > >Signed-off-by: Chris Dunlop <chris@onthe.net.au> >--- > receiver.c | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > >diff --git a/receiver.c b/receiver.c >index a9aae26..a372e00 100644 >--- a/receiver.c >+++ b/receiver.c >@@ -54,6 +54,7 @@ extern int allowed_lull; > extern int delay_updates; > extern mode_t orig_umask; > extern struct stats stats; >+extern char *link_by_hash_dir; > extern char *tmpdir; > extern char *partial_dir; > extern char *basis_dir[MAX_BASIS_DIRS+1]; >@@ -848,7 +849,8 @@ int recv_files(int f_in, int f_out, char *local_name) > > /* recv file data */ > recv_ok = receive_data(f_in, fnamecmp, fd1, st.st_size, >- fname, fd2, F_LENGTH(file), F_SUM(file)); >+ fname, fd2, F_LENGTH(file), >+ link_by_hash_dir ? F_SUM(file) : NULL); > > log_item(log_code, file, iflags, NULL); > >-- >1.7.0.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8659
: 7178