Fix handling of skipped elements on the very first element transmitted.
authorclaudio <claudio@openbsd.org>
Wed, 27 Dec 2023 17:22:25 +0000 (17:22 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 27 Dec 2023 17:22:25 +0000 (17:22 +0000)
commit5fe4a96f81734a61d2d5b538ec319f1884412c58
tree8151c4781b802b61d7d8adf89fa9a199cb9034a8
parent4736a7f39a72b7fa495507d9040f2a76c36e4b51
Fix handling of skipped elements on the very first element transmitted.
rsync compares e.g. the first mtime against 0, if the mtime is the epoch
then rsync will skip this field and openrsync will choke when receiving it.
So if there is no first element but a FLIST_XYZ_SAME flag is use 0 as
value.
Problem noticed by job@
OK tb@ job@ and yoda@ for fixing the if statements
usr.bin/rsync/flist.c