version 1.2, 2019/02/10 23:24:14 |
version 1.3, 2019/02/11 19:18:36 |
|
|
sess.opts = opts; |
sess.opts = opts; |
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(&sess, "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(&sess, "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(&sess, "io_read_int"); |
goto out; |
goto out; |
} |
} |
|
|
if (FARGS_RECEIVER != f->mode) { |
if (FARGS_RECEIVER != f->mode) { |
LOG2(&sess, "client starting sender: %s", |
LOG2(&sess, "client starting sender: %s", |
NULL == f->host ? "(local)" : f->host); |
NULL == f->host ? "(local)" : f->host); |
if ( ! rsync_sender(&sess, fd, fd, |
if (!rsync_sender(&sess, fd, fd, |
f->sourcesz, f->sources)) { |
f->sourcesz, f->sources)) { |
ERRX1(&sess, "rsync_sender"); |
ERRX1(&sess, "rsync_sender"); |
goto out; |
goto out; |
|
|
} else { |
} else { |
LOG2(&sess, "client starting receiver: %s", |
LOG2(&sess, "client starting receiver: %s", |
NULL == f->host ? "(local)" : f->host); |
NULL == f->host ? "(local)" : f->host); |
if ( ! rsync_receiver(&sess, fd, fd, f->sink)) { |
if (!rsync_receiver(&sess, fd, fd, f->sink)) { |
ERRX1(&sess, "rsync_receiver"); |
ERRX1(&sess, "rsync_receiver"); |
goto out; |
goto out; |
} |
} |