Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-AMF
Commits
b7ab8330
Commit
b7ab8330
authored
Apr 02, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure that the context is not null
parent
32ebc5e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
4 deletions
+29
-4
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+14
-2
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+15
-2
No files found.
src/amf-app/amf_n1.cpp
View file @
b7ab8330
...
...
@@ -1353,7 +1353,13 @@ bool amf_n1::generate_authentication_vector() {
//------------------------------------------------------------------------------
bool
amf_n1
::
is_amf_ue_id_2_nas_context
(
const
long
&
amf_ue_ngap_id
)
const
{
std
::
shared_lock
lock
(
m_amfueid2nas_context
);
return
bool
{
amfueid2nas_context
.
count
(
amf_ue_ngap_id
)
>
0
};
// return bool{amfueid2nas_context.count(amf_ue_ngap_id) > 0};
if
(
amfueid2nas_context
.
count
(
amf_ue_ngap_id
)
>
0
)
{
if
(
amfueid2nas_context
.
at
(
amf_ue_ngap_id
).
get
()
!=
nullptr
)
{
return
true
;
}
}
return
false
;
}
//------------------------------------------------------------------------------
...
...
@@ -1379,7 +1385,13 @@ void amf_n1::remove_amf_ue_ngap_id_2_nas_context(const long& amf_ue_ngap_id) {
//------------------------------------------------------------------------------
bool
amf_n1
::
is_guti_2_nas_context
(
const
std
::
string
&
guti
)
const
{
std
::
shared_lock
lock
(
m_guti2nas_context
);
return
bool
{
guti2nas_context
.
count
(
guti
)
>
0
};
// return bool{guti2nas_context.count(guti) > 0};
if
(
guti2nas_context
.
count
(
guti
)
>
0
)
{
if
(
guti2nas_context
.
at
(
guti
).
get
()
!=
nullptr
)
{
return
true
;
}
}
return
false
;
}
//------------------------------------------------------------------------------
...
...
src/amf-app/amf_n2.cpp
View file @
b7ab8330
...
...
@@ -2140,7 +2140,14 @@ void amf_n2::send_handover_preparation_failure(
bool
amf_n2
::
is_ran_ue_id_2_ue_ngap_context
(
const
uint32_t
&
ran_ue_ngap_id
)
const
{
std
::
shared_lock
lock
(
m_ranid2uecontext
);
return
bool
{
ranid2uecontext
.
count
(
ran_ue_ngap_id
)
>
0
};
if
(
ranid2uecontext
.
count
(
ran_ue_ngap_id
)
>
0
)
{
if
(
ranid2uecontext
.
at
(
ran_ue_ngap_id
).
get
()
!=
nullptr
)
{
return
true
;
}
}
return
false
;
// return bool{ranid2uecontext.count(ran_ue_ngap_id) > 0};
}
//------------------------------------------------------------------------------
...
...
@@ -2168,7 +2175,13 @@ std::shared_ptr<ue_ngap_context> amf_n2::amf_ue_id_2_ue_ngap_context(
bool
amf_n2
::
is_amf_ue_id_2_ue_ngap_context
(
const
unsigned
long
&
amf_ue_ngap_id
)
const
{
std
::
shared_lock
lock
(
m_amfueid2uecontext
);
return
bool
{
amfueid2uecontext
.
count
(
amf_ue_ngap_id
)
>
0
};
// return bool{amfueid2uecontext.count(amf_ue_ngap_id) > 0};
if
(
amfueid2uecontext
.
count
(
amf_ue_ngap_id
)
>
0
)
{
if
(
amfueid2uecontext
.
at
(
amf_ue_ngap_id
).
get
()
!=
nullptr
)
{
return
true
;
}
}
return
false
;
}
//------------------------------------------------------------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment