Skip to content

Commit ec6d70a

Browse files
committed
Addressed review comments
1 parent f87adfd commit ec6d70a

File tree

3 files changed

+16
-47
lines changed

3 files changed

+16
-47
lines changed

lte/gateway/c/oai/tasks/mme_app/mme_app_defs.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,4 +338,10 @@ int map_sgs_emm_cause(SgsRejectCause_t sgs_cause);
338338
pthread_rwlock_wrlock(&(mMEsTATS)->rw_lock)
339339
#define mme_stats_unlock(mMEsTATS) pthread_rwlock_unlock(&(mMEsTATS)->rw_lock)
340340

341+
#define mme_app_compare_tmsi(_tmsi1, _tmsi2) \
342+
( \
343+
(_tmsi1.tmsi[0] != _tmsi2.tmsi[0]) || (_tmsi1.tmsi[1] != _tmsi2.tmsi[1]) ||\
344+
(_tmsi1.tmsi[2] != _tmsi2.tmsi[2]) || (_tmsi1.tmsi[3] != _tmsi2.tmsi[3])) \
345+
? (RETURNerror) : (RETURNok)
346+
341347
#endif /* MME_APP_DEFS_H_ */

lte/gateway/c/oai/tasks/mme_app/mme_app_sgs_detach.c

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@
5050
#include "mme_app_sgs_fsm.h"
5151
#include "s1ap_messages_types.h"
5252
#include "sgs_messages_types.h"
53-
#include "emm_proc.h"
5453

5554
/**
5655
* Function to send a SGS EPS detach indication to SGSAP in either the initial case
@@ -457,47 +456,37 @@ void mme_app_handle_sgs_detach_req(
457456
OAILOG_DEBUG(LOG_MME_APP, "SGS Detach type = ( %d )\n", detach_type);
458457
if (sgs_fsm_get_status(evnt.ue_id, evnt.ctx) != SGS_NULL) {
459458
switch (detach_type) {
460-
/*
461-
* Handle Ue initiated EPS detach towards SGS
462-
*/
459+
// Handle Ue initiated EPS detach towards SGS
463460
case EMM_SGS_UE_INITIATED_EPS_DETACH: {
464461
ue_context_p->sgs_detach_type = SGS_UE_INITIATED_IMSI_DETACH_FROM_EPS;
465462
mme_app_send_sgs_eps_detach_indication(
466463
ue_context_p, ue_context_p->sgs_detach_type);
467464
evnt.primitive = _SGS_EPS_DETACH_IND;
468465
} break;
469-
/*
470-
* Handle Ue initiated IMSI detach towards SGS
471-
*/
466+
// Handle Ue initiated IMSI detach towards SGS
472467
case EMM_SGS_UE_INITIATED_EXPLICIT_NONEPS_DETACH: {
473468
ue_context_p->sgs_detach_type =
474469
SGS_EXPLICIT_UE_INITIATED_IMSI_DETACH_FROM_NONEPS;
475470
mme_app_send_sgs_imsi_detach_indication(
476471
ue_context_p, ue_context_p->sgs_detach_type);
477472
evnt.primitive = _SGS_IMSI_DETACH_IND;
478473
} break;
479-
/*
480-
* Handle Ue initiated Combined EPS/IMSI detach towards SGS
481-
*/
474+
// Handle Ue initiated Combined EPS/IMSI detach towards SGS
482475
case EMM_SGS_UE_INITIATED_COMBINED_DETACH: {
483476
ue_context_p->sgs_detach_type =
484477
SGS_COMBINED_UE_INITIATED_IMSI_DETACH_FROM_EPS_N_NONEPS;
485478
mme_app_send_sgs_imsi_detach_indication(
486479
ue_context_p, ue_context_p->sgs_detach_type);
487480
evnt.primitive = _SGS_IMSI_DETACH_IND;
488481
} break;
489-
/*
490-
* Handle Network initiated EPS detach towards SGS
491-
*/
482+
// Handle Network initiated EPS detach towards SGS
492483
case EMM_SGS_NW_INITIATED_EPS_DETACH: {
493484
ue_context_p->sgs_detach_type = SGS_NW_INITIATED_IMSI_DETACH_FROM_EPS;
494485
mme_app_send_sgs_eps_detach_indication(
495486
ue_context_p, ue_context_p->sgs_detach_type);
496487
evnt.primitive = _SGS_EPS_DETACH_IND;
497488
} break;
498-
/*
499-
* Handle Network initiated Implicit IMSI detach towards SGS
500-
*/
489+
// Handle Network initiated Implicit IMSI detach towards SGS
501490
case EMM_SGS_NW_INITIATED_IMPLICIT_NONEPS_DETACH: {
502491
ue_context_p->sgs_detach_type =
503492
SGS_IMPLICIT_NW_INITIATED_IMSI_DETACH_FROM_EPS_N_NONEPS;
@@ -514,9 +503,8 @@ void mme_app_handle_sgs_detach_req(
514503
break;
515504
}
516505
/*
517-
* Call the SGS FSM process function to
518-
* process the respective message in different state
519-
* and update the SGS State based on event
506+
* Call the SGS FSM to process the respective message
507+
* in different state and update the SGS State based on event
520508
*/
521509
sgs_fsm_process(&evnt);
522510
}

lte/gateway/c/oai/tasks/mme_app/mme_app_sgsap_location_update.c

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,7 @@
7070
void _mme_app_update_granted_service_for_ue(ue_mm_context_t* ue_context)
7171
{
7272
OAILOG_FUNC_IN(LOG_MME_APP);
73-
additional_updt_t additional_update_type = -1;
74-
75-
additional_update_type =
73+
additional_updt_t additional_update_type =
7674
(additional_updt_t) ue_context->emm_context.additional_update_type;
7775
mme_config_read_lock(&mme_config);
7876

@@ -131,29 +129,6 @@ uint8_t _get_eps_attach_type(uint8_t emm_attach_type)
131129
return eps_attach_type;
132130
}
133131

134-
/*******************************************************************************
135-
** **
136-
** Name: _mme_app_compare_tmsi() **
137-
** Description Compares the tmsi, to check both tmsi's have same **
138-
** value **
139-
** **
140-
** Inputs: tmsi_mobile_identity_t tmsi1 and tmsi2 **
141-
** Returns: if tmsis' are equal, retun RETURNok **
142-
** else RETURNerror **
143-
** **
144-
********************************************************************************/
145-
int _mme_app_compare_tmsi(
146-
tmsi_mobile_identity_t tmsi1,
147-
tmsi_mobile_identity_t tmsi2)
148-
{
149-
if (
150-
(tmsi1.tmsi[0] != tmsi2.tmsi[0]) || (tmsi1.tmsi[1] != tmsi2.tmsi[1]) ||
151-
(tmsi1.tmsi[2] != tmsi2.tmsi[2]) || (tmsi1.tmsi[3] != tmsi2.tmsi[3])) {
152-
OAILOG_FUNC_RETURN(LOG_MME_APP, RETURNerror);
153-
}
154-
OAILOG_FUNC_RETURN(LOG_MME_APP, RETURNok);
155-
}
156-
157132
/******************************************************************************
158133
** **
159134
** Name: mme_app_send_itti_sgsap_ue_activity_ind() **
@@ -363,8 +338,8 @@ static int _handle_cs_domain_loc_updt_acc(
363338
* store the new TMSI and set flag
364339
*/
365340
if (
366-
(_mme_app_compare_tmsi(
367-
emm_ctx_p->csfbparams.mobileid.tmsi, received_tmsi)) == RETURNerror) {
341+
mme_app_compare_tmsi(
342+
emm_ctx_p->csfbparams.mobileid.tmsi, received_tmsi) == RETURNerror) {
368343
OAILOG_INFO(LOG_MME_APP, "MME-APP - New TMSI Allocated\n");
369344
memcpy(
370345
&emm_ctx_p->csfbparams.mobileid.tmsi,

0 commit comments

Comments
 (0)