mirror of
https://salsa.debian.org/ha-team/libqb
synced 2025-12-29 00:41:21 +00:00
RB: convert the rb_peek() status into a recv like status.
peek returns 0 on no data, so convert that to -EAGAIN. Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
121abe3dbe
commit
deddaea86c
@ -106,10 +106,15 @@ static ssize_t
|
||||
qb_ipc_shm_peek(struct qb_ipc_one_way *one_way, void **data_out,
|
||||
int32_t ms_timeout)
|
||||
{
|
||||
ssize_t rc;
|
||||
if (one_way->u.shm.rb == NULL) {
|
||||
return -ENOTCONN;
|
||||
}
|
||||
return qb_rb_chunk_peek(one_way->u.shm.rb, data_out, ms_timeout);
|
||||
rc = qb_rb_chunk_peek(one_way->u.shm.rb, data_out, ms_timeout);
|
||||
if (rc == 0) {
|
||||
return -EAGAIN;
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Loading…
Reference in New Issue
Block a user