fix dangling pointer in cell selection dispatching

master
Francisco Paisana 4 years ago committed by Francisco Paisana
parent 81848deae2
commit 3d76cc6c1a

@ -360,8 +360,9 @@ void ue_stack_lte::start_cell_search()
void ue_stack_lte::start_cell_select(const phy_interface_rrc_lte::phy_cell_t* phy_cell) void ue_stack_lte::start_cell_select(const phy_interface_rrc_lte::phy_cell_t* phy_cell)
{ {
background_tasks.push_task([this, phy_cell](uint32_t worker_id) { phy_interface_rrc_lte::phy_cell_t cell_copy = *phy_cell;
bool ret = phy->cell_select(phy_cell); background_tasks.push_task([this, cell_copy](uint32_t worker_id) {
bool ret = phy->cell_select(&cell_copy);
// notify back RRC // notify back RRC
pending_tasks.push(background_queue_id, [this, ret]() { rrc.cell_select_completed(ret); }); pending_tasks.push(background_queue_id, [this, ret]() { rrc.cell_select_completed(ret); });
}); });

Loading…
Cancel
Save