mirror of https://github.com/PentHertz/srsLTE.git
Check msg_queue size_tail_bytes existence of buffer
This commit is contained in:
parent
62ae4e3094
commit
04609cd07d
|
@ -131,7 +131,10 @@ public:
|
|||
uint32_t size_tail_bytes()
|
||||
{
|
||||
pthread_mutex_lock(&mutex);
|
||||
uint32_t r = buf[tail]->N_bytes;
|
||||
uint32_t r = 0;
|
||||
if (buf[tail]) {
|
||||
r = buf[tail]->N_bytes;
|
||||
}
|
||||
pthread_mutex_unlock(&mutex);
|
||||
return r;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue