From 6803f48cc04448e1779172716fae8ea2c7260e76 Mon Sep 17 00:00:00 2001 From: Francisco Paisana Date: Wed, 16 Dec 2020 18:30:09 +0000 Subject: [PATCH] cell selection and reest rrc procedures were causing a callstack reentrancy problem. This issue was circumvented with a defer_task call --- srsue/src/stack/rrc/rrc_procedures.cc | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/srsue/src/stack/rrc/rrc_procedures.cc b/srsue/src/stack/rrc/rrc_procedures.cc index f8996ead8..4e83716e8 100644 --- a/srsue/src/stack/rrc/rrc_procedures.cc +++ b/srsue/src/stack/rrc/rrc_procedures.cc @@ -679,11 +679,13 @@ void rrc::cell_selection_proc::then(const srslte::proc_result_t& pr { Info("Completed with %s.\n", proc_result.is_success() ? "success" : "failure"); // Inform Connection Request Procedure - if (rrc_ptr->conn_req_proc.is_busy()) { - rrc_ptr->conn_req_proc.trigger(proc_result); - } else if (rrc_ptr->connection_reest.is_busy()) { - rrc_ptr->connection_reest.trigger(proc_result); - } + rrc_ptr->task_sched.defer_task([this, proc_result]() { + if (rrc_ptr->conn_req_proc.is_busy()) { + rrc_ptr->conn_req_proc.trigger(proc_result); + } else if (rrc_ptr->connection_reest.is_busy()) { + rrc_ptr->connection_reest.trigger(proc_result); + } + }); } /**************************************