mirror of https://github.com/PentHertz/srsLTE.git
Deallocate SCH pdu on demux instead of pdu_queue
This commit is contained in:
parent
036e39481c
commit
e9fcb10c9e
|
@ -93,6 +93,10 @@ public:
|
|||
#endif
|
||||
}
|
||||
|
||||
uint32_t nof_available_pdus() {
|
||||
return available.size();
|
||||
}
|
||||
|
||||
bool is_almost_empty() {
|
||||
return available.size() < capacity/20;
|
||||
}
|
||||
|
|
|
@ -96,11 +96,6 @@ 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;
|
||||
}
|
||||
|
|
|
@ -148,6 +148,8 @@ 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);
|
||||
|
|
Loading…
Reference in New Issue