added blocking-io docs
[rsync/rsync.git] / flist.c
diff --git a/flist.c b/flist.c
index 14fa5a3..f12bf89 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -299,7 +299,11 @@ static void receive_file_entry(struct file_struct **fptr,
        memset((char *)file, 0, sizeof(*file));
        (*fptr) = file;
 
-       if (l2 >= MAXPATHLEN-l1) overflow("receive_file_entry");
+       if (l2 >= MAXPATHLEN-l1) {
+               rprintf(FERROR,"overflow: flags=0x%x l1=%d l2=%d lastname=%s\n",
+                       flags, l1, l2, lastname);
+               overflow("receive_file_entry");
+       }
 
        strlcpy(thisname,lastname,l1+1);
        read_sbuf(f,&thisname[l1],l2);
@@ -432,7 +436,7 @@ struct file_struct *make_file(int f, char *fname)
 
        if (readlink_stat(fname,&st,linkbuf) != 0) {
                io_error = 1;
-               rprintf(FERROR,"%s: %s\n",
+               rprintf(FERROR,"readlink %s: %s\n",
                        fname,strerror(errno));
                return NULL;
        }
@@ -669,8 +673,10 @@ struct file_list *send_file_list(int f,int argc,char *argv[])
                }
 
                if (link_stat(fname,&st) != 0) {
-                       io_error=1;
-                       rprintf(FERROR,"%s : %s\n",fname,strerror(errno));
+                       if (f != -1) {
+                               io_error=1;
+                               rprintf(FERROR,"link_stat %s : %s\n",fname,strerror(errno));
+                       }
                        continue;
                }
 
@@ -856,7 +862,8 @@ struct file_list *recv_file_list(int f)
   /* if protocol version is >= 17 then recv the io_error flag */
   if (f != -1 && remote_version >= 17) {
          extern int module_id;
-         if (lp_ignore_errors(module_id)) {
+         extern int ignore_errors;
+         if (lp_ignore_errors(module_id) || ignore_errors) {
                  read_int(f);
          } else {
                  io_error |= read_int(f);