summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/shm_rbuff_pthr.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/shm_rbuff_pthr.c b/src/lib/shm_rbuff_pthr.c
index cedbc7b1..5a3e8c42 100644
--- a/src/lib/shm_rbuff_pthr.c
+++ b/src/lib/shm_rbuff_pthr.c
@@ -203,9 +203,13 @@ ssize_t shm_rbuff_read_b(struct shm_rbuff * rb,
}
if (idx != -ETIMEDOUT) {
- idx = *tail_el_ptr(rb);
- *rb->tail = (*rb->tail + 1) & ((SHM_RBUFF_SIZE) - 1);
- pthread_cond_broadcast(rb->del);
+ if (*rb->acl & ACL_FLOWDOWN)
+ idx = -EFLOWDOWN;
+ else {
+ idx = *tail_el_ptr(rb);
+ *rb->tail = (*rb->tail + 1) & ((SHM_RBUFF_SIZE) - 1);
+ pthread_cond_broadcast(rb->del);
+ }
}
pthread_cleanup_pop(true);