- * @note This comment was added later by mbp who was trying to work it
- * out. It might be wrong.
- **/
-void recv_generator(char *fname, struct file_list *flist, int i, int f_out)
-{
- int fd;
- STRUCT_STAT st;
- struct map_struct *buf;
- int statret;
- struct file_struct *file = flist->files[i];
- char *fnamecmp;
+ * Note that f_out is set to -1 when doing final directory-permission and
+ * modification-time repair. */
+static void recv_generator(char *fname, struct file_list *flist,
+ struct file_struct *file, int ndx,
+ int f_out, int f_out_name)
+{
+ static int missing_below = -1;
+ int fd = -1, f_copy = -1;
+ STRUCT_STAT st, partial_st;
+ struct file_struct *back_file = NULL;
+ int statret, stat_errno;
+ char *fnamecmp, *partialptr, *backupptr = NULL;