[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.14 and 1.15

version 1.14, 2004/12/08 19:28:10 version 1.15, 2004/12/08 20:00:23
Line 146 
Line 146 
 int  int
 cvs_resp_handle(struct cvsroot *root, char *line)  cvs_resp_handle(struct cvsroot *root, char *line)
 {  {
           int ret;
         char *cp, *cmd;          char *cp, *cmd;
         struct cvs_resp *resp;          struct cvs_resp *resp;
   
Line 163 
Line 164 
                 return (-1);                  return (-1);
         }          }
   
         return (*cvs_resp_swtab[resp->resp_id].hdlr)(root, resp->resp_id, cp);          ret = (*cvs_resp_swtab[resp->resp_id].hdlr)(root, resp->resp_id, cp);
   
           if (ret == -1)
                   cvs_log(LP_ERR, "error in handling of `%s' response", cmd);
   
           return (ret);
 }  }
   
   
Line 535 
Line 541 
         mode_t fmode;          mode_t fmode;
         char path[MAXPATHLEN], cksum_buf[CVS_CKSUM_LEN];          char path[MAXPATHLEN], cksum_buf[CVS_CKSUM_LEN];
         BUF *fbuf;          BUF *fbuf;
         CVSFILE *cf;  
         CVSENTRIES *entfile;          CVSENTRIES *entfile;
         struct cvs_ent *ep;          struct cvs_ent *ep;
         struct timeval tv[2];          struct timeval tv[2];
   
         STRIP_SLASH(line);          STRIP_SLASH(line);
   
         /* find parent directory of file */  
         cf = cvs_file_find(cvs_files, line);  
         if (cf == NULL) {  
                 cvs_log(LP_ERR, "failed to find directory %s", line);  
                 return (-1);  
         }  
   
         /* read the remote path of the file */          /* read the remote path of the file */
         if (cvs_getln(root, path, sizeof(path)) < 0)          if (cvs_getln(root, path, sizeof(path)) < 0)
                 return (-1);                  return (-1);
Line 567 
Line 565 
                 return (-1);                  return (-1);
         }          }
   
         if (type == CVS_RESP_CREATED) {          if (cvs_modtime != CVS_DATE_DMSEC) {
                 /* set the timestamp as the last one received from Mod-time */  
                 ep->ce_mtime = cvs_modtime;                  ep->ce_mtime = cvs_modtime;
                 cvs_ent_add(entfile, ep);                  cvs_modtime = CVS_DATE_DMSEC;   /* invalidate */
         } else if ((type == CVS_RESP_UPDEXIST) || (type == CVS_RESP_UPDATED)) {          } else
                   ep->ce_mtime = time(&(ep->ce_mtime));
   
           if ((type == CVS_RESP_UPDEXIST) || (type == CVS_RESP_UPDATED) ||
               (type == CVS_RESP_MERGED)) {
                 if (cvs_ent_remove(entfile, ep->ce_name) < 0)                  if (cvs_ent_remove(entfile, ep->ce_name) < 0)
                         cvs_log(LP_WARN, "failed to remove entry for `%s'",                          cvs_log(LP_WARN, "failed to remove entry for `%s'",
                             ep->ce_name);                              ep->ce_name);
           }
   
                 cvs_ent_add(entfile, ep);          if (cvs_ent_add(entfile, ep) < 0) {
         } else if (type == CVS_RESP_MERGED) {                  cvs_ent_free(ep);
                   cvs_ent_close(entfile);
                   return (-1);
         }          }
   
           cvs_ent_close(entfile);
   
         fbuf = cvs_recvfile(root, &fmode);          fbuf = cvs_recvfile(root, &fmode);
         if (fbuf == NULL)          if (fbuf == NULL)

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15