Support the reception of a file-transfer header without xfer data
authorWayne Davison <wayned@samba.org>
Thu, 14 Apr 2005 01:42:13 +0000 (01:42 +0000)
committerWayne Davison <wayned@samba.org>
Thu, 14 Apr 2005 01:42:13 +0000 (01:42 +0000)
when we're on the server side and --only-write-batch was specified.

receiver.c

index 6e2bd1c..abe1f66 100644 (file)
@@ -462,7 +462,8 @@ int recv_files(int f_in, struct file_list *flist, char *local_name)
                }
                if (write_batch < 0) {
                        log_item(file, &stats, iflags, NULL);
-                       discard_receive_data(f_in, file->length);
+                       if (!am_server)
+                               discard_receive_data(f_in, file->length);
                        continue;
                }