ClusterLabs/libqb — pull request #122 by AnchorCat (2014-06-10 06:45:26+00:00)
Title: Ringbuffer

This branch fixes two bugs in the ringbuffer code:

- qb_log_target_formats() does not support formatting size_t values with
%zd. Use %ld to format them as long integers instead.

- qb_rb_open() expects the size field to represent the maximum chunk size.
It adds QB_RB_CHUNK_MARGIN + 1 and rounds up to the page size to
determine the ringbuffer's total size. When creating a ringbuffer from a
file we must compensate by subtracting this amount from the file's size.