send detach request in connection request if RRC is not connected

master
Andre Puschmann 6 years ago
parent 94188c1d7a
commit ae23cfbac7

@ -184,7 +184,7 @@ bool nas::detach_request() {
case EMM_STATE_REGISTERED: case EMM_STATE_REGISTERED:
// send detach request // send detach request
send_detach_request(true); send_detach_request(true);
state = EMM_STATE_DEREGISTERED_INITIATED; state = EMM_STATE_DEREGISTERED;
break; break;
case EMM_STATE_DEREGISTERED_INITIATED: case EMM_STATE_DEREGISTERED_INITIATED:
// do nothing .. // do nothing ..
@ -1337,7 +1337,11 @@ void nas::send_detach_request(bool switch_off)
} }
nas_log->info("Sending detach request\n"); nas_log->info("Sending detach request\n");
if (rrc->is_connected()) {
rrc->write_sdu(cfg.lcid, pdu); rrc->write_sdu(cfg.lcid, pdu);
} else {
rrc->connection_request(LIBLTE_RRC_CON_REQ_EST_CAUSE_MO_SIGNALLING, pdu);
}
} }
void nas::send_detach_accept() void nas::send_detach_accept()

Loading…
Cancel
Save