buffer: chunk: use new pipe_read_all() api
@@ -376,7 +376,8 @@ int flb_buffer_chunk_add(struct flb_buffer_worker *worker,
struct stat st;
/* Read the expected chunk reference */
- ret = flb_pipe_r(worker->ch_add[0], &chunk, sizeof(struct flb_buffer_chunk));
+ ret = flb_pipe_read_all(worker->ch_add[0], &chunk,
+ sizeof(struct flb_buffer_chunk));
if (ret <= 0) {
flb_errno();
return -1;
@@ -555,7 +556,8 @@ int flb_buffer_chunk_delete_ref(struct flb_buffer_worker *worker,
struct flb_output_instance *o_ins;
/* Read the expected chunk reference */
- ret = flb_pipe_r(worker->ch_del_ref[0], &chunk, sizeof(struct flb_buffer_chunk));
+ ret = flb_pipe_read_all(worker->ch_del_ref[0], &chunk,
+ sizeof(struct flb_buffer_chunk));
if (ret <= 0) {
flb_errno();
return FLB_BUFFER_ERROR;
