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

Diff for /src/usr.bin/cvs/Attic/resp.c between version 1.11 and 1.12

version 1.11, 2004/12/06 21:03:12 version 1.12, 2004/12/07 16:48:55
Line 124 
Line 124 
 static char *cvs_mt_stack[CVS_MTSTK_MAXDEPTH];  static char *cvs_mt_stack[CVS_MTSTK_MAXDEPTH];
 static u_int cvs_mtstk_depth = 0;  static u_int cvs_mtstk_depth = 0;
   
 static time_t cvs_modtime = 0;  static time_t cvs_modtime = CVS_DATE_DMSEC;
   
   
 /* last checksum received */  /* last checksum received */
Line 519 
Line 519 
         char path[MAXPATHLEN], cksum_buf[CVS_CKSUM_LEN];          char path[MAXPATHLEN], cksum_buf[CVS_CKSUM_LEN];
         BUF *fbuf;          BUF *fbuf;
         CVSFILE *cf;          CVSFILE *cf;
           CVSENTRIES *entfile;
         struct cvs_ent *ep;          struct cvs_ent *ep;
         struct timeval tv[2];          struct timeval tv[2];
   
Line 543 
Line 544 
                 return (-1);                  return (-1);
         snprintf(path, sizeof(path), "%s/%s", line, ep->ce_name);          snprintf(path, sizeof(path), "%s/%s", line, ep->ce_name);
   
           entfile = cvs_ent_open(line, O_WRONLY);
           if (entfile == NULL) {
                   cvs_ent_free(ep);
                   return (-1);
           }
   
         if (type == CVS_RESP_CREATED) {          if (type == CVS_RESP_CREATED) {
                 /* set the timestamp as the last one received from Mod-time */                  /* set the timestamp as the last one received from Mod-time */
                 ep->ce_mtime = cvs_modtime;                  ep->ce_mtime = cvs_modtime;
                 cvs_ent_add(cf->cf_ddat->cd_ent, ep);                  cvs_ent_add(entfile, ep);
         } else if (type == CVS_RESP_UPDEXIST) {          } else if ((type == CVS_RESP_UPDEXIST) || (type == CVS_RESP_UPDATED)) {
         } else if (type == CVS_RESP_UPDATED) {                  if (cvs_ent_remove(entfile, ep->ce_name) < 0)
                           cvs_log(LP_WARN, "failed to remove entry for `%s'",
                               ep->ce_name);
   
                   cvs_ent_add(entfile, ep);
           } else if (type == CVS_RESP_MERGED) {
         }          }
   
         fbuf = cvs_recvfile(root, &fmode);          fbuf = cvs_recvfile(root, &fmode);
Line 557 
Line 569 
   
         cvs_buf_write(fbuf, path, fmode);          cvs_buf_write(fbuf, path, fmode);
   
         tv[0].tv_sec = (long)cvs_modtime;          if (cvs_modtime != CVS_DATE_DMSEC) {
         tv[0].tv_usec = 0;                  tv[0].tv_sec = (long)cvs_modtime;
         tv[1].tv_sec = (long)cvs_modtime;                  tv[0].tv_usec = 0;
         tv[1].tv_usec = 0;                  tv[1].tv_sec = (long)cvs_modtime;
         if (utimes(path, tv) == -1)                  tv[1].tv_usec = 0;
                 cvs_log(LP_ERRNO, "failed to set file timestamps");                  if (utimes(path, tv) == -1)
                           cvs_log(LP_ERRNO, "failed to set file timestamps");
           }
   
         /* now see if there is a checksum */          /* now see if there is a checksum */
         if (cvs_fcksum != NULL) {          if (cvs_fcksum != NULL) {
Line 627 
Line 641 
 cvs_resp_mode(struct cvsroot *root, int type, char *line)  cvs_resp_mode(struct cvsroot *root, int type, char *line)
 {  {
         if (cvs_strtomode(line, &cvs_lastmode) < 0) {          if (cvs_strtomode(line, &cvs_lastmode) < 0) {
                   cvs_log(LP_ERR, "error handling Mode response");
                 return (-1);                  return (-1);
         }          }
         return (0);          return (0);

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12