only call PHR procedure in MUX when it's registered

This commit is contained in:
Andre Puschmann 2017-06-28 17:10:19 +02:00
parent 8dbabb2834
commit 4bc7b19595
1 changed files with 8 additions and 4 deletions

View File

@ -189,13 +189,17 @@ uint8_t* mux::pdu_get(uint8_t *payload, uint32_t pdu_sz, uint32_t tx_tti, uint32
bsr_is_inserted = true; bsr_is_inserted = true;
} }
} }
// MAC control element for PHR // MAC control element for PHR
float phr_value; if (phr_procedure) {
if (phr_procedure->generate_phr_on_ul_grant(&phr_value)) { float phr_value;
if (pdu_msg.new_subh()) { if (phr_procedure->generate_phr_on_ul_grant(&phr_value)) {
pdu_msg.get()->set_phr(phr_value); if (pdu_msg.new_subh()) {
pdu_msg.get()->set_phr(phr_value);
}
} }
} }
// Update buffer states for all logical channels // Update buffer states for all logical channels
int sdu_space = pdu_msg.get_sdu_space(); int sdu_space = pdu_msg.get_sdu_space();
for (uint32_t i=0;i<lch.size();i++) { for (uint32_t i=0;i<lch.size();i++) {