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

Diff for /src/usr.bin/cvs/client.c between version 1.3 and 1.4

version 1.3, 2004/07/27 13:08:23 version 1.4, 2004/07/28 01:53:28
Line 78 
Line 78 
  * cvs_client_connect()   * cvs_client_connect()
  *   *
  * Open a client connection to the cvs server whose address is given in   * Open a client connection to the cvs server whose address is given in
  * the global <cvs_root> variable.  The method used to connect depends on the   * the <root> variable.  The method used to connect depends on the
  * setting of the CVS_RSH variable.   * setting of the CVS_RSH variable.
    * Returns 0 on success, or -1 on failure.
  */   */
   
 int  int
 cvs_client_connect(void)  cvs_client_connect(struct cvsroot *root)
 {  {
         int argc, infd[2], outfd[2];          int argc, infd[2], outfd[2];
         pid_t pid;          pid_t pid;
Line 121 
Line 122 
                 argc = 0;                  argc = 0;
                 argv[argc++] = cvs_rsh;                  argv[argc++] = cvs_rsh;
   
                 if (cvs_root->cr_user != NULL) {                  if (root->cr_user != NULL) {
                         argv[argc++] = "-l";                          argv[argc++] = "-l";
                         argv[argc++] = cvs_root->cr_user;                          argv[argc++] = root->cr_user;
                 }                  }
   
   
Line 131 
Line 132 
                 if (cvs_server_cmd == NULL)                  if (cvs_server_cmd == NULL)
                         cvs_server_cmd = "cvs";                          cvs_server_cmd = "cvs";
   
                 argv[argc++] = cvs_root->cr_host;                  argv[argc++] = root->cr_host;
                 argv[argc++] = cvs_server_cmd;                  argv[argc++] = cvs_server_cmd;
                 argv[argc++] = "server";                  argv[argc++] = "server";
                 argv[argc] = NULL;                  argv[argc] = NULL;
Line 156 
Line 157 
                 cvs_log(LP_ERRNO, "failed to create pipe stream");                  cvs_log(LP_ERRNO, "failed to create pipe stream");
                 return (-1);                  return (-1);
         }          }
           root->cr_srvin = cvs_server_in;
           root->cr_srvout = cvs_server_out;
   
         /* make the streams line-buffered */          /* make the streams line-buffered */
         setvbuf(cvs_server_in, NULL, _IOLBF, 0);          setvbuf(cvs_server_in, NULL, _IOLBF, 0);
Line 183 
Line 186 
  */   */
   
 void  void
 cvs_client_disconnect(void)  cvs_client_disconnect(struct cvsroot *root)
 {  {
         cvs_log(LP_DEBUG, "closing client connection");          cvs_log(LP_DEBUG, "closing client connection");
         (void)fclose(cvs_server_in);          (void)fclose(cvs_server_in);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4