lte/gateway/c/core/oai/tasks/amf/prepare_request_for_smf.cpp
/***************************************************************************
**                                                                        **
** Name:    release_session_gprc_req()                                    **
**                                                                        **
** Description: Sends session release request to SMF                      **
**                                                                        **
**                                                                        **
***************************************************************************/


Sends session release request to SMF
Sends session release request to SMF
int release_session_gprc_req(amf_smf_release_t* message, char* imsi) {
  magma::lte::SetSMSessionContext req;
  auto* req_common = req.mutable_common_context();
  req_common->mutable_sid()->mutable_id()->assign(imsi);
  req_common->mutable_sid()->set_type(
      magma::lte::SubscriberID_IDType::SubscriberID_IDType_IMSI);
  req_common->set_sm_session_state(magma::lte::SMSessionFSMState::RELEASED_4);
  req_common->set_sm_session_version(1);  
  auto* req_rat_specific =
      req.mutable_rat_specific_context()->mutable_m5gsm_session_context();
  req_rat_specific->set_pdu_session_id(message->pdu_session_id);
  req_rat_specific->set_procedure_trans_identity(
      (const char*) (&(message->pti)));
  req_common->set_rat_type(magma::lte::RATType::TGPP_NR);
  OAILOG_INFO(
      LOG_AMF_APP,
      "Sending msg(grpc) to :[sessiond] for ue: [%s] release,  pdu session: "
      "[%d]\n",
      imsi, message->pdu_session_id);
  AMFClientServicer::getInstance().set_smf_session(req);
  return RETURNok;
}
int release_session_gprc_req ( amf_smf_release_t * message , char * imsi ) { magma :: lte :: SetSMSessionContext req ; auto * req_common = req . mutable_common_context ( ) ; req_common -> mutable_sid ( ) -> mutable_id ( ) -> assign ( imsi ) ; req_common -> mutable_sid ( ) -> set_type ( magma :: lte :: SubscriberID_IDType :: SubscriberID_IDType_IMSI ) ; req_common -> set_sm_session_state ( magma :: lte :: SMSessionFSMState :: RELEASED_4 ) ; req_common -> set_sm_session_version ( 1 ) ; auto * req_rat_specific = req . mutable_rat_specific_context ( ) -> mutable_m5gsm_session_context ( ) ; req_rat_specific -> set_pdu_session_id ( message -> pdu_session_id ) ; req_rat_specific -> set_procedure_trans_identity ( ( const char * ) ( & ( message -> pti ) ) ) ; req_common -> set_rat_type ( magma :: lte :: RATType :: TGPP_NR ) ; OAILOG_INFO ( LOG_AMF_APP , " " " \n " , imsi , message -> pdu_session_id ) ; AMFClientServicer :: getInstance ( ) . set_smf_session ( req ) ; return RETURNok ; }
Name:    release_session_gprc_req()
Name : release_session_gprc_req ()
// uint32