]> git.proxmox.com Git - pxar.git/commit
fix `decode_entry` on special files
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 15 Dec 2020 10:34:15 +0000 (11:34 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 15 Dec 2020 10:34:15 +0000 (11:34 +0100)
commit318462ea3d6060ee06acb1751eca8f72d8ac5ec8
treefcbcde6219c5fe9c8496521c61b43ab2729be242
parent9e7287abc192aa6718009d3c534064bbba0dad3c
fix `decode_entry` on special files

When using the random accessor to access FIFOs or sockets,
the ranged reader limits the data to only that entry, and
the `decode_entry` will never see a `PAYLOAD` or
`GOODBYE_TABLE` item to finish the entry.
Instead, it'll reach EOF and we need to handle this.
The accessor now tells the decoder to expect EOF as a valid
condition for ending the entry.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
src/accessor/mod.rs
src/decoder/mod.rs
tests/simple/main.rs