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
222896e9
Commit
222896e9
authored
Aug 05, 2021
by
Niuhaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bugs for ue_context
parent
8096aaa3
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
src/amf-app/amf_app.cpp
src/amf-app/amf_app.cpp
+8
-5
src/amf-app/amf_n2.cpp
src/amf-app/amf_n2.cpp
+1
-1
No files found.
src/amf-app/amf_app.cpp
View file @
222896e9
...
...
@@ -316,8 +316,8 @@ void amf_app::handle_itti_message(
std
::
shared_ptr
<
ue_context
>
uc
=
std
::
shared_ptr
<
ue_context
>
(
new
ue_context
());
string
ue_context_key
=
"app_ue_ranid_"
+
to_string
(
itti_msg
.
ran_ue_ngap_id
)
+
"-amfid_"
+
to_string
(
amf_ue_ngap_id
);
std
::
string
record_id
=
"amf_ue_ngap_id=
\'
"
+
to_string
(
amf_ue_ngap_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
record_id
;
//
std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + "RECORD_ID = \'" + ue_context_key + "\'";
//
std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + record_id ;
std
::
string
udsf_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
"RECORD_ID =
\'
"
+
ue_context_key
+
"
\'
"
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing ue_context with ue_context_key ..."
);
}
else
if
(
udsf_response
.
dump
().
length
()
<
8
){
...
...
@@ -342,7 +342,8 @@ void amf_app::handle_itti_message(
//Update ue_context to UDSF
Logger
::
amf_app
().
debug
(
"Update ue_context to UDSF"
);
record_id
=
"amf_ue_ngap_id=
\'
"
+
to_string
(
amf_ue_ngap_id
)
+
"
\'
"
;
udsf_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
record_id
;
//udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + record_id ;
udsf_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
"RECORD_ID =
\'
"
+
ue_context_key
+
"
\'
"
;
nlohmann
::
json
udsf_ue_context
;
nlohmann
::
json
cgi
;
cgi
[
"Content-ID"
]
=
"cgi"
;
...
...
@@ -559,8 +560,10 @@ bool amf_app::generate_5g_guti(
// uc = ran_amf_id_2_ue_context(ue_context_key);
std
::
shared_ptr
<
ue_context
>
uc
=
std
::
shared_ptr
<
ue_context
>
(
new
ue_context
());
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
ue_context_key
+
"
\'
"
;
std
::
string
udsf_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
record_id
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
to_string
(
amfid
)
+
"
\'
"
;
//std::string record_id = "RECORD_ID=\'" + ue_context_key + "\'";
//std::string udsf_url = "http://10.103.239.53:7123/nudsf-dr/v1/amfdata/" + std::string("ue_context/records/") + record_id;
std
::
string
udsf_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_context/records/"
)
+
"RECORD_ID =
\'
"
+
ue_context_key
+
"
\'
"
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id"
);
return
false
;
...
...
src/amf-app/amf_n2.cpp
View file @
222896e9
...
...
@@ -737,7 +737,7 @@ void amf_n2::handle_itti_message(itti_initial_ue_message& init_ue_msg) {
old_ran_ue_ngap_id
=
ran_ue_ngap_id
;
else
old_ran_ue_ngap_id
=
nc
.
get
()
->
ran_ue_ngap_id
;
udsf_put_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
to_string
(
old_ran_ue_ngap_id
)
;
udsf_put_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"ue_ngap_context/records/"
)
+
+
"RECORD_ID=
\'
"
+
to_string
(
old_ran_ue_ngap_id
)
+
"
\'
"
;
udsf_ue_ngap_context
[
"meta"
]
[
"tags"
]
=
{
{
"RECORD_ID"
,
nlohmann
::
json
::
array
({
to_string
(
old_ran_ue_ngap_id
)})},
{
"from_nf_ID"
,
nlohmann
::
json
::
array
({
"AMF_1234"
})}
...
...
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