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

Diff for /src/usr.bin/rsync/client.c between version 1.14 and 1.15

version 1.14, 2019/03/23 16:04:28 version 1.15, 2019/05/08 20:00:25
Line 50 
Line 50 
         sess.lver = RSYNC_PROTOCOL;          sess.lver = RSYNC_PROTOCOL;
   
         if (!io_write_int(&sess, fd, sess.lver)) {          if (!io_write_int(&sess, fd, sess.lver)) {
                 ERRX1(&sess, "io_write_int");                  ERRX1("io_write_int");
                 goto out;                  goto out;
         } else if (!io_read_int(&sess, fd, &sess.rver)) {          } else if (!io_read_int(&sess, fd, &sess.rver)) {
                 ERRX1(&sess, "io_read_int");                  ERRX1("io_read_int");
                 goto out;                  goto out;
         } else if (!io_read_int(&sess, fd, &sess.seed)) {          } else if (!io_read_int(&sess, fd, &sess.seed)) {
                 ERRX1(&sess, "io_read_int");                  ERRX1("io_read_int");
                 goto out;                  goto out;
         }          }
   
         if (sess.rver < sess.lver) {          if (sess.rver < sess.lver) {
                 ERRX(&sess,                  ERRX("remote protocol %d is older than our own %d: unsupported",
                     "remote protocol %d is older than our own %d: unsupported",  
                     sess.rver, sess.lver);                      sess.rver, sess.lver);
                 rc = 2;                  rc = 2;
                 goto out;                  goto out;
         }          }
   
         LOG2(&sess, "client detected client version %d, server version %d, seed %d",          LOG2("client detected client version %d, server version %d, seed %d",
             sess.lver, sess.rver, sess.seed);              sess.lver, sess.rver, sess.seed);
   
         sess.mplex_reads = 1;          sess.mplex_reads = 1;
Line 79 
Line 78 
          */           */
   
         if (f->mode != FARGS_RECEIVER) {          if (f->mode != FARGS_RECEIVER) {
                 LOG2(&sess, "client starting sender: %s",                  LOG2("client starting sender: %s",
                     f->host == NULL ? "(local)" : f->host);                      f->host == NULL ? "(local)" : f->host);
                 if (!rsync_sender(&sess, fd, fd, f->sourcesz,                  if (!rsync_sender(&sess, fd, fd, f->sourcesz,
                     f->sources)) {                      f->sources)) {
                         ERRX1(&sess, "rsync_sender");                          ERRX1("rsync_sender");
                         goto out;                          goto out;
                 }                  }
         } else {          } else {
                 LOG2(&sess, "client starting receiver: %s",                  LOG2("client starting receiver: %s",
                     f->host == NULL ? "(local)" : f->host);                      f->host == NULL ? "(local)" : f->host);
                 if (!rsync_receiver(&sess, fd, fd, f->sink)) {                  if (!rsync_receiver(&sess, fd, fd, f->sink)) {
                         ERRX1(&sess, "rsync_receiver");                          ERRX1("rsync_receiver");
                         goto out;                          goto out;
                 }                  }
         }          }
Line 98 
Line 97 
 #if 0  #if 0
         /* Probably the EOF. */          /* Probably the EOF. */
         if (io_read_check(&sess, fd))          if (io_read_check(&sess, fd))
                 WARNX(&sess, "data remains in read pipe");                  WARNX("data remains in read pipe");
 #endif  #endif
   
         rc = 0;          rc = 0;

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