fix nas proc logging, and reuse of cell selection result
This commit is contained in:
parent
81a466a641
commit
71ebac861c
|
@ -584,14 +584,22 @@ proc_outcome_t rrc::connection_request_proc::init(rrc*
|
|||
// Launch failed but cell selection was not already running
|
||||
Error("Failed to initiate cell selection procedure...\n");
|
||||
return proc_outcome_t::error;
|
||||
} else if (not rrc_ptr->cell_selector.is_complete()) {
|
||||
// In case it was already running, just wait for an cell_selection_complete event trigger
|
||||
Info("Cell selection proc already on-going. Wait for its result\n");
|
||||
} else {
|
||||
// It already completed with success. FIXME: Find more elegant solution
|
||||
Info("A cell selection procedure has just finished successfully. I am reusing its result\n");
|
||||
cell_selection_complete e{};
|
||||
e.is_success = rrc_ptr->cell_selector.get()->is_success();
|
||||
e.cs_result = rrc_ptr->cell_selector.get()->get_cs_result();
|
||||
return trigger_event(e);
|
||||
}
|
||||
// In case it was already running, just wait for an cell_selection_complete event trigger
|
||||
Info("Cell selection proc already on-going. Wait for its result\n");
|
||||
} else {
|
||||
// In case we were able to launch it, let the callback list handle it
|
||||
rrc_ptr->callback_list.defer_proc(rrc_ptr->cell_selector);
|
||||
}
|
||||
return proc_outcome_t::repeat;
|
||||
return proc_outcome_t::yield;
|
||||
}
|
||||
|
||||
proc_outcome_t rrc::connection_request_proc::step()
|
||||
|
|
|
@ -36,9 +36,9 @@
|
|||
|
||||
using namespace srslte;
|
||||
|
||||
#define Error(fmt, ...) nas_ptr->nas_log->error("%s - " fmt, name(), ##__VA_ARGS__)
|
||||
#define Warning(fmt, ...) nas_ptr->nas_log->warning("%s - " fmt, name(), ##__VA_ARGS__)
|
||||
#define Info(fmt, ...) nas_ptr->nas_log->info("%s - " fmt, name(), ##__VA_ARGS__)
|
||||
#define Error(fmt, ...) nas_ptr->nas_log->error("Proc \"%s\" - " fmt, name(), ##__VA_ARGS__)
|
||||
#define Warning(fmt, ...) nas_ptr->nas_log->warning("Proc \"%s\" - " fmt, name(), ##__VA_ARGS__)
|
||||
#define Info(fmt, ...) nas_ptr->nas_log->info("Proc \"%s\" - " fmt, name(), ##__VA_ARGS__)
|
||||
|
||||
namespace srsue {
|
||||
|
||||
|
@ -157,12 +157,12 @@ nas::rrc_connect_proc::init(nas* nas_ptr_, srslte::establishment_cause_t cause_,
|
|||
nas_ptr->rrc->set_ue_identity(s_tmsi);
|
||||
}
|
||||
|
||||
Info("Starting...\n");
|
||||
state = state_t::conn_req;
|
||||
if (not nas_ptr->start_connection_request(cause_, std::move(pdu))) {
|
||||
return proc_outcome_t::error;
|
||||
}
|
||||
|
||||
Info("Starting...\n");
|
||||
return proc_outcome_t::yield;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue