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

Diff for /src/usr.bin/cvs/Attic/proto.c between version 1.27 and 1.28

version 1.27, 2004/11/16 21:03:43 version 1.28, 2004/11/26 16:23:50
Line 177 
Line 177 
 static FILE *cvs_server_inlog = NULL;  static FILE *cvs_server_inlog = NULL;
 static FILE *cvs_server_outlog = NULL;  static FILE *cvs_server_outlog = NULL;
   
   static pid_t cvs_subproc_pid;
   
   
 /*  /*
  * cvs_connect()   * cvs_connect()
  *   *
Line 194 
Line 196 
 cvs_connect(struct cvsroot *root)  cvs_connect(struct cvsroot *root)
 {  {
         int argc, infd[2], outfd[2], errfd[2];          int argc, infd[2], outfd[2], errfd[2];
         pid_t pid;  
         char *argv[16], *cvs_server_cmd, *vresp;          char *argv[16], *cvs_server_cmd, *vresp;
   
         if (pipe(infd) == -1) {          if (pipe(infd) == -1) {
Line 221 
Line 222 
                 return (-1);                  return (-1);
         }          }
   
         pid = fork();          cvs_subproc_pid = fork();
         if (pid == -1) {          if (cvs_subproc_pid == -1) {
                 cvs_log(LP_ERRNO, "failed to fork for cvs server connection");                  cvs_log(LP_ERRNO, "failed to fork for cvs server connection");
                 return (-1);                  return (-1);
         }          }
         if (pid == 0) {          else if (cvs_subproc_pid == 0) {
                 if ((dup2(infd[0], STDIN_FILENO) == -1) ||                  if ((dup2(infd[0], STDIN_FILENO) == -1) ||
                     (dup2(outfd[1], STDOUT_FILENO) == -1)) {                      (dup2(outfd[1], STDOUT_FILENO) == -1)) {
                         cvs_log(LP_ERRNO,                          cvs_log(LP_ERRNO,
Line 960 
Line 961 
 int  int
 cvs_senddir(struct cvsroot *root, CVSFILE *dir)  cvs_senddir(struct cvsroot *root, CVSFILE *dir)
 {  {
         char buf[MAXPATHLEN];          char lbuf[MAXPATHLEN], rbuf[MAXPATHLEN];
   
         if (dir->cf_ddat->cd_repo == NULL)          if (dir->cf_ddat->cd_repo == NULL)
                 strlcpy(buf, root->cr_dir, sizeof(buf));                  strlcpy(rbuf, root->cr_dir, sizeof(rbuf));
         else          else
                 snprintf(buf, sizeof(buf), "%s/%s", root->cr_dir,                  snprintf(rbuf, sizeof(rbuf), "%s/%s", root->cr_dir,
                     dir->cf_ddat->cd_repo);                      dir->cf_ddat->cd_repo);
   
         if ((cvs_sendreq(root, CVS_REQ_DIRECTORY, dir->cf_path) < 0) ||          cvs_file_getpath(dir, lbuf, sizeof(lbuf));
             (cvs_sendln(root, buf) < 0))  
           if ((cvs_sendreq(root, CVS_REQ_DIRECTORY, lbuf) < 0) ||
               (cvs_sendln(root, rbuf) < 0))
                 return (-1);                  return (-1);
   
         return (0);          return (0);

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28