|
|
@ -48,7 +48,7 @@ uint8_t* pdu_queue::request(uint32_t len)
|
|
|
|
fprintf(stderr, "Error request buffer of invalid size %d. Max bytes %d\n", len, MAX_PDU_LEN);
|
|
|
|
fprintf(stderr, "Error request buffer of invalid size %d. Max bytes %d\n", len, MAX_PDU_LEN);
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
pdu_t *pdu = pool.allocate();
|
|
|
|
pdu_t *pdu = pool.allocate("pdu_queue::request");
|
|
|
|
if (!pdu) {
|
|
|
|
if (!pdu) {
|
|
|
|
if (log_h) {
|
|
|
|
if (log_h) {
|
|
|
|
log_h->error("Not enough buffers for MAC PDU\n");
|
|
|
|
log_h->error("Not enough buffers for MAC PDU\n");
|
|
|
@ -96,11 +96,6 @@ bool pdu_queue::process_pdus()
|
|
|
|
if (callback) {
|
|
|
|
if (callback) {
|
|
|
|
callback->process_pdu(pdu->ptr, pdu->len, pdu->channel, pdu->tstamp);
|
|
|
|
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++;
|
|
|
|
cnt++;
|
|
|
|
have_data = true;
|
|
|
|
have_data = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|