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
a7d2d518
Commit
a7d2d518
authored
Aug 02, 2021
by
Niuhaiwen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stateless-ng-proceure
parent
4e01d190
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
2 deletions
+26
-2
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImpl.cpp
...amf_server/impl/IndividualSubscriptionDocumentApiImpl.cpp
+26
-2
No files found.
src/sbi/amf_server/impl/IndividualSubscriptionDocumentApiImpl.cpp
View file @
a7d2d518
...
...
@@ -58,11 +58,35 @@ void IndividualSubscriptionDocumentApiImpl::gnb_message_from_plugin(const std::u
std
::
memcpy
(
buffer
,
format_string_as_hex
(
transdata
.
get_amf_data
()),
transdata
.
get_amf_data
().
length
()
/
2
+
1
);
bstring
payload
=
blk2bstr
(
buffer
,
transdata
.
get_amf_data
().
length
()
/
2
+
1
);
printf
(
"%s
\n
,length %d"
,
bdata
(
payload
),
blength
(
payload
));
if
(
!
amf_n2_inst
->
is_assoc_id_2_gnb_context
(
assoc_id
))
{
amf_n2_inst
->
handle_sctp_new_association
(
assoc_id
,
10
,
8
);
// try to get gnb_context from UDSF
bool
is_gnb_context_present
=
false
;
std
::
shared_ptr
<
gnb_context
>
gc
=
std
::
shared_ptr
<
gnb_context
>
(
new
gnb_context
());
amf_n2_inst
->
set_assoc_id_2_gnb_context
(
assoc_id
,
gc
);
nlohmann
::
json
udsf_response
;
std
::
string
record_id
=
"RECORD_ID=
\'
"
+
std
::
to_string
(
assoc_id
)
+
"
\'
"
;
std
::
string
udsf_url
=
"http://10.103.239.53:7123/nudsf-dr/v1/amfdata/"
+
std
::
string
(
"gnb_context/records/"
)
+
record_id
;
if
(
!
amf_n2_inst
->
curl_http_client_udsf
(
udsf_url
,
""
,
"GET"
,
udsf_response
)){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id ..."
);
is_gnb_context_present
=
false
;
}
else
if
(
udsf_response
.
dump
().
length
()
<
8
){
Logger
::
amf_n2
().
error
(
"No existing gNG context with assoc_id ....."
);
is_gnb_context_present
=
false
;
}
else
{
is_gnb_context_present
=
true
;
}
if
(
is_gnb_context_present
){
Logger
::
amf_n2
().
debug
(
"udsf_response: %s"
,
udsf_response
.
dump
().
c_str
());
gc
.
get
()
->
gnb_context_from_json
(
udsf_response
);
}
else
{
amf_n2_inst
->
handle_sctp_new_association
(
assoc_id
,
10
,
8
);
}
amf_n2_inst
->
handle_receive
(
payload
,
assoc_id
,
stream
,
10
,
8
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
"plugin message
\n
"
);
//if (!amf_n2_inst->is_assoc_id_2_gnb_context(assoc_id)) {//to do - get context from udsf
// amf_n2_inst->handle_sctp_new_association(assoc_id,10,8);
//}
}
...
...
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