serve: Fix calulation of server_mirror_bytes_remaining

Previously, we didn't count the number of bytes represented by events
in the stream; we just counted each pending event as one byte. Whoops.
This commit is contained in:
nick
2013-09-23 17:09:55 +01:00
parent f4793c7059
commit 5c1b119f83

View File

@@ -860,7 +860,7 @@ uint64_t server_mirror_bytes_remaining( struct server * serve )
{
if ( server_is_mirroring( serve ) ) {
uint64_t bytes_to_xfer =
bitset_stream_size( serve->allocation_map ) +
bitset_stream_queued_bytes( serve->allocation_map, BITSET_STREAM_SET ) +
( serve->size - serve->mirror->offset );
return bytes_to_xfer;