Revert "Deallocate SCH pdu on demux instead of pdu_queue"

This reverts commit e9fcb10c9e.
This commit is contained in:
Andre Puschmann 2018-05-08 21:41:33 +02:00
parent 240f95530a
commit 595ed70cae
3 changed files with 5 additions and 6 deletions

View File

@ -93,10 +93,6 @@ public:
#endif
}
uint32_t nof_available_pdus() {
return available.size();
}
bool is_almost_empty() {
return available.size() < capacity/20;
}

View File

@ -96,6 +96,11 @@ bool pdu_queue::process_pdus()
if (callback) {
callback->process_pdu(pdu->ptr, pdu->len, pdu->channel, pdu->tstamp);
}
if (pdu->channel == DCH) {
if (!pool.deallocate(pdu)) {
log_h->warning("Error deallocating from buffer pool in process_pdus(): buffer not created in this pool.\n");
}
}
cnt++;
have_data = true;
}

View File

@ -148,8 +148,6 @@ void demux::process_pdu(uint8_t *mac_pdu, uint32_t nof_bytes, srslte::pdu_queue:
process_sch_pdu(&mac_msg);
//srslte_vec_fprint_byte(stdout, mac_pdu, nof_bytes);
pdus.deallocate(mac_pdu);
break;
case srslte::pdu_queue::BCH:
rlc->write_pdu_bcch_dlsch(mac_pdu, nof_bytes);