s1ap fix - send S1AP UEContextRelease when the UE does a new RRC connection setup with the same TMSI

master
Francisco 4 years ago committed by Francisco Paisana
parent 23203b73ae
commit 42e7fc656b

@ -383,12 +383,11 @@ void rrc::ue::handle_rrc_con_req(rrc_conn_request_s* msg)
has_tmsi = true;
// Make sure that the context does not already exist
for (auto ue_it = parent->users.begin(); ue_it != parent->users.end(); ue_it++) {
if (ue_it->first != rnti && ue_it->second->has_tmsi && ue_it->second->mmec == mmec &&
ue_it->second->m_tmsi == m_tmsi) {
for (auto& user : parent->users) {
if (user.first != rnti && user.second->has_tmsi && user.second->mmec == mmec && user.second->m_tmsi == m_tmsi) {
parent->logger.info("RRC connection request: UE context already exists. M-TMSI=%d", m_tmsi);
parent->rem_user_thread(ue_it->first); // Simply remove the old context. No need to notify the MME, it will
// update the eNB/MME-UE S1AP Id pair.
parent->s1ap->user_release(rnti, asn1::s1ap::cause_radio_network_opts::radio_conn_with_ue_lost);
parent->rem_user_thread(user.first);
break;
}
}

@ -1396,10 +1396,6 @@ bool s1ap::ue::send_ulnastransport(srsran::unique_byte_buffer_t pdu)
bool s1ap::ue::send_uectxtreleaserequest(const cause_c& cause)
{
if (!s1ap_ptr->mme_connected) {
return false;
}
if (not ctxt.mme_ue_s1ap_id.has_value()) {
logger.error("Cannot send UE context release request without a MME-UE-S1AP-Id allocated.");
return false;

Loading…
Cancel
Save