[BACK]Return to remote.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / cvs

Diff for /src/usr.bin/cvs/remote.c between version 1.20 and 1.21

version 1.20, 2008/02/10 14:15:36 version 1.21, 2008/02/27 22:34:04
Line 155 
Line 155 
 }  }
   
 void  void
 cvs_remote_send_file(const char *path)  cvs_remote_send_file(const char *path, int _fd)
 {  {
         int fd;          int fd;
         FILE *out, *in;          FILE *out, *in;
Line 169 
Line 169 
         else          else
                 out = current_cvsroot->cr_srvin;                  out = current_cvsroot->cr_srvin;
   
         if ((fd = open(path, O_RDONLY)) == -1)          fd = dup(_fd);
                 fatal("cvs_remote_send_file: %s: %s", path, strerror(errno));          if (fd == -1)
                   fatal("cvs_remote_send_file: dup: %s", strerror(errno));
   
           if (lseek(fd, SEEK_SET, 0) < 0)
                   fatal("cvs_remote_send_file: %s: lseek: %s", path,
                       strerror(errno));
   
         if (fstat(fd, &st) == -1)          if (fstat(fd, &st) == -1)
                 fatal("cvs_remote_send_file: %s: %s", path, strerror(errno));                  fatal("cvs_remote_send_file: %s: fstat: %s", path,
                       strerror(errno));
   
         cvs_modetostr(st.st_mode, buf, sizeof(buf));          cvs_modetostr(st.st_mode, buf, sizeof(buf));
         cvs_remote_output(buf);          cvs_remote_output(buf);

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21