version 1.28.2.1, 2021/11/09 13:41:24 |
version 1.29, 2021/06/30 13:10:04 |
|
|
/* $Id$ */ |
/* $OpenBSD$ */ |
/* |
/* |
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> |
* Copyright (c) 2019 Kristaps Dzonsons <kristaps@bsd.lv> |
* |
* |
|
|
{ |
{ |
struct flist *fl = NULL; |
struct flist *fl = NULL; |
const struct flist *f; |
const struct flist *f; |
size_t i, flsz = 0, phase = 0; |
size_t i, flsz = 0, phase = 0, excl; |
int rc = 0, c; |
int rc = 0, c; |
int32_t idx; |
int32_t idx; |
struct pollfd pfd[3]; |
struct pollfd pfd[3]; |
|
|
} |
} |
|
|
/* Client sends zero-length exclusions if deleting. */ |
/* Client sends zero-length exclusions if deleting. */ |
if (!sess->opts->server && sess->opts->del) |
|
send_rules(sess, fdout); |
|
|
|
|
if (!sess->opts->server && sess->opts->del && |
|
!io_write_int(sess, fdout, 0)) { |
|
ERRX1("io_write_int"); |
|
goto out; |
|
} |
|
|
/* |
/* |
* Then the file list in any mode. |
* Then the file list in any mode. |
* Finally, the IO error (always zero for us). |
* Finally, the IO error (always zero for us). |
|
|
* This is always 0 for now. |
* This is always 0 for now. |
*/ |
*/ |
|
|
if (sess->opts->server) |
if (sess->opts->server) { |
recv_rules(sess, fdin); |
if (!io_read_size(sess, fdin, &excl)) { |
|
ERRX1("io_read_size"); |
|
goto out; |
|
} else if (excl != 0) { |
|
ERRX1("exclusion list is non-empty"); |
|
goto out; |
|
} |
|
} |
|
|
/* |
/* |
* Set up our poll events. |
* Set up our poll events. |