Commit c55f7021 authored by Andrew Tridgell's avatar Andrew Tridgell

fixed a rare SEGV that can happen when a file disappears (due to

another program) during an update
parent 6957ae33
...@@ -254,10 +254,12 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname, ...@@ -254,10 +254,12 @@ static int receive_data(int f_in,struct map_struct *buf,int fd,char *fname,
rprintf(FINFO,"chunk[%d] of size %d at %.0f offset=%.0f\n", rprintf(FINFO,"chunk[%d] of size %d at %.0f offset=%.0f\n",
i,len,(double)offset2,(double)offset); i,len,(double)offset2,(double)offset);
if (buf) {
map = map_ptr(buf,offset2,len); map = map_ptr(buf,offset2,len);
see_token(map, len); see_token(map, len);
sum_update(map,len); sum_update(map,len);
}
if (fd != -1 && write_file(fd,map,len) != len) { if (fd != -1 && write_file(fd,map,len) != len) {
rprintf(FERROR,"write failed on %s : %s\n", rprintf(FERROR,"write failed on %s : %s\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment