fix rwlock in PDCP

we've used a rdlock but since the users struct is modified, we should be
really using a rwlock
master
Andre Puschmann 5 years ago
parent e7c10270fa
commit dc8c5687c6

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

Loading…
Cancel
Save