nas: fix UE not attaching if PLMN isn't found after switching on

if no cell/PLMN can be found if the UE is switched on, the UE was never
trying again.
In theory this would be handled by T3410, but the timer
is not started in case the PLMN search isn't done yet.
master
Andre Puschmann 5 years ago
parent ead2acf70c
commit 25ab36ddd5

@ -398,11 +398,15 @@ void nas::start_attach_proc(srslte::proc_state_t* result, srslte::establishment_
}
return;
}
plmn_searcher.then([this, result](const proc_state_t& res) {
plmn_searcher.then([this, result, cause_](const proc_state_t& res) {
nas_log->info("Attach Request from PLMN Search %s\n", res.is_success() ? "finished successfully" : "failed");
if (result != nullptr) {
*result = res;
}
if (!res.is_success()) {
// try again ..
task_handler->defer_callback(reattach_timer_duration_ms, [&]() { start_attach_proc(nullptr, cause_); });
}
});
} else {
nas_log->info("PLMN selected in state %s\n", emm_state_text[state]);

Loading…
Cancel
Save