fix bug when stopping ringbuffer

This commit is contained in:
Andre Puschmann 2019-01-11 13:27:48 +01:00
parent e328681343
commit 0abc7d4dbd
1 changed files with 1 additions and 0 deletions

View File

@ -111,6 +111,7 @@ int srslte_ringbuffer_read(srslte_ringbuffer_t *q, void *p, int nof_bytes)
void srslte_ringbuffer_stop(srslte_ringbuffer_t *q) {
pthread_mutex_lock(&q->mutex);
q->active = false;
pthread_cond_broadcast(&q->cvar);
pthread_mutex_unlock(&q->mutex);
}