=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/rsync/sender.c,v retrieving revision 1.28 retrieving revision 1.28.2.1 diff -u -r1.28 -r1.28.2.1 --- src/usr.bin/rsync/sender.c 2021/04/05 18:17:37 1.28 +++ src/usr.bin/rsync/sender.c 2021/11/09 13:41:24 1.28.2.1 @@ -1,4 +1,4 @@ -/* $Id: sender.c,v 1.28 2021/04/05 18:17:37 deraadt Exp $ */ +/* $Id: sender.c,v 1.28.2.1 2021/11/09 13:41:24 benno Exp $ */ /* * Copyright (c) 2019 Kristaps Dzonsons * @@ -358,7 +358,7 @@ { struct flist *fl = NULL; const struct flist *f; - size_t i, flsz = 0, phase = 0, excl; + size_t i, flsz = 0, phase = 0; int rc = 0, c; int32_t idx; struct pollfd pfd[3]; @@ -393,13 +393,9 @@ } /* 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. * Finally, the IO error (always zero for us). @@ -427,15 +423,8 @@ * This is always 0 for now. */ - if (sess->opts->server) { - 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; - } - } + if (sess->opts->server) + recv_rules(sess, fdin); /* * Set up our poll events.