Skip to content

Commit 5d2e6db

Browse files
committed
Addressed self comments
Signed-off-by: Rashmi <[email protected]>
1 parent 96a0047 commit 5d2e6db

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_handlers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ void clean_stale_enb_state(oai::S1apState* state,
396396
if ((stale_enb_association.sctp_assoc_id() !=
397397
new_enb_association->sctp_assoc_id()) &&
398398
(stale_enb_association.enb_id() == new_enb_association->enb_id())) {
399-
OAILOG_INFO(LOG_S1AP, "Found stale eNB at association id %d",
399+
OAILOG_INFO(LOG_S1AP, "Found stale eNB at association id %u",
400400
stale_enb_association.sctp_assoc_id());
401401
delete_state_enb = true;
402402
break;
@@ -3685,7 +3685,7 @@ status_code_e s1ap_handle_sctp_disconnection(oai::S1apState* state,
36853685

36863686
// Checking if the assoc id has a valid eNB attached to it
36873687
if ((s1ap_state_get_enb(state, assoc_id, &enb_association)) != PROTO_MAP_OK) {
3688-
OAILOG_ERROR(LOG_S1AP, "No eNB attached to this assoc_id: %d\n", assoc_id);
3688+
OAILOG_ERROR(LOG_S1AP, "No eNB attached to this assoc_id: %u\n", assoc_id);
36893689
OAILOG_FUNC_RETURN(LOG_S1AP, RETURNerror);
36903690
}
36913691

@@ -4914,7 +4914,7 @@ status_code_e s1ap_mme_handle_enb_configuration_transfer(
49144914
OAILOG_FUNC_RETURN(LOG_S1AP, RETURNerror);
49154915
}
49164916

4917-
if (enb_association.s1_enb_state() != magma::lte::oai::S1AP_READY) {
4917+
if (enb_association.s1_enb_state() != oai::S1AP_READY) {
49184918
// ignore the message if s1 not ready
49194919
OAILOG_INFO(
49204920
LOG_S1AP,
@@ -5393,7 +5393,7 @@ static int handle_ue_context_rel_timer_expiry(zloop_t* loop, int timer_id,
53935393
oai::UeDescription* ue_ref_p = nullptr;
53945394
mme_ue_s1ap_id_t mme_ue_s1ap_id = 0;
53955395
imsi64_t imsi64 = INVALID_IMSI64;
5396-
oai::S1apState* state = NULL;
5396+
oai::S1apState* state = nullptr;
53975397
if (!s1ap_pop_timer_arg_ue_id(timer_id, &mme_ue_s1ap_id)) {
53985398
OAILOG_WARNING(LOG_S1AP, "Invalid Timer Id expiration, Timer Id: %u\n",
53995399
timer_id);

lte/gateway/c/core/oai/tasks/s1ap/s1ap_mme_nas_procedures.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ void s1ap_handle_mme_ue_id_notification(
12231223

12241224
magma::proto_map_uint32_uint64_t ue_id_coll;
12251225
ue_id_coll.map = enb_ref.mutable_ue_id_map();
1226-
ue_id_coll.insert((const hash_key_t)mme_ue_s1ap_id, ue_ref->comp_s1ap_id());
1226+
ue_id_coll.insert(mme_ue_s1ap_id, ue_ref->comp_s1ap_id());
12271227
s1ap_state_update_enb_map(state, sctp_assoc_id, &enb_ref);
12281228

12291229
OAILOG_DEBUG(LOG_S1AP,

lte/gateway/c/core/oai/tasks/s1ap/s1ap_state_manager.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,14 @@ void free_s1ap_state(oai::S1apState* state_cache_p) {
104104
AssertFatal(state_cache_p,
105105
"S1apState passed to free_s1ap_state must not be null");
106106

107-
oai::EnbDescription enb;
108107
proto_map_uint32_enb_description_t enb_map;
109108
enb_map.map = state_cache_p->mutable_enbs();
110109

111110
if (enb_map.isEmpty()) {
112111
OAILOG_DEBUG(LOG_S1AP, "No keys in the enb map");
113112
} else {
114113
for (auto itr = enb_map.map->begin(); itr != enb_map.map->end(); itr++) {
115-
enb = itr->second;
114+
oai::EnbDescription enb = itr->second;
116115
enb.clear_ue_id_map();
117116
}
118117
}
@@ -230,19 +229,17 @@ map_uint64_ue_description_t* S1apStateManager::get_s1ap_ue_state() {
230229
}
231230

232231
oai::S1apState* S1apStateManager::get_state(bool read_from_db) {
233-
OAILOG_FUNC_IN(LOG_AMF_APP);
232+
OAILOG_FUNC_IN(LOG_S1AP);
234233
AssertFatal(
235234
is_initialized,
236235
"S1apStateManager init() function should be called to initialize state");
237-
// TODO: Add check for reentrant read/write function, to block multiple
238-
// reads
239236
state_dirty = true;
240237
AssertFatal(state_cache_p != nullptr, " S1ap State cache is NULL");
241238
if (persist_state_enabled && read_from_db) {
242239
read_state_from_db();
243240
read_ue_state_from_db();
244241
}
245-
OAILOG_FUNC_RETURN(LOG_AMF_APP, state_cache_p);
242+
OAILOG_FUNC_RETURN(LOG_S1AP, state_cache_p);
246243
}
247244

248245
void S1apStateManager::write_s1ap_state_to_db() {

0 commit comments

Comments
 (0)