fix rwlock in PDCP

we've used a rdlock but since the users struct is modified, we should be
really using a rwlock
This commit is contained in:
Andre Puschmann 2020-02-12 09:47:17 +01:00
parent e7c10270fa
commit dc8c5687c6
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ void pdcp::stop()
void pdcp::add_user(uint16_t rnti)
{
pthread_rwlock_rdlock(&rwlock);
pthread_rwlock_wrlock(&rwlock);
if (users.count(rnti) == 0) {
srslte::pdcp* obj = new srslte::pdcp(timers, log_h);
obj->init(&users[rnti].rlc_itf, &users[rnti].rrc_itf, &users[rnti].gtpu_itf);