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
e7de4a97
Commit
e7de4a97
authored
Apr 23, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue for PDU session establishment reject
parent
961172b4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
21 deletions
+27
-21
src/amf-app/amf_n11.cpp
src/amf-app/amf_n11.cpp
+27
-21
No files found.
src/amf-app/amf_n11.cpp
View file @
e7de4a97
...
...
@@ -581,8 +581,11 @@ void amf_n11::curl_http_client(
bstring
n1sm_hex
,
n2sm_hex
;
Logger
::
amf_n11
().
debug
(
"Get response with HTTP code (%d)"
,
httpCode
);
Logger
::
amf_n11
().
debug
(
"Response body %s"
,
response
.
c_str
());
if
(
static_cast
<
http_response_codes_e
>
(
httpCode
)
==
http_response_codes_e
::
HTTP_RESPONSE_CODE_0
)
{
// TODO: should be removed
Logger
::
amf_n11
().
error
(
"Cannot get response when calling %s"
,
remoteUri
.
c_str
());
// free curl before returning
...
...
@@ -618,30 +621,33 @@ void amf_n11::curl_http_client(
return
;
}
try
{
response_data
=
nlohmann
::
json
::
parse
(
json_data_response
);
}
catch
(
nlohmann
::
json
::
exception
&
e
)
{
Logger
::
amf_n11
().
warn
(
"Could not get Json content from the response"
);
// Set the default Cause
response_data
[
"error"
][
"cause"
]
=
"504 Gateway Timeout"
;
}
Logger
::
amf_n11
().
debug
(
"Get response with jsonData: %s"
,
json_data_response
.
c_str
());
msg_str_2_msg_hex
(
n1sm
.
substr
(
0
,
n1sm
.
length
()
-
2
),
n1sm_hex
);
// TODO: pdu session establishment reject bugs from SMF
print_buffer
(
"amf_n11"
,
"Get response with n1sm:"
,
(
uint8_t
*
)
bdata
(
n1sm_hex
),
blength
(
n1sm_hex
));
// Transfer N1 to gNB/UE if available
if
(
number_parts
>
1
)
{
try
{
response_data
=
nlohmann
::
json
::
parse
(
json_data_response
);
}
catch
(
nlohmann
::
json
::
exception
&
e
)
{
Logger
::
amf_n11
().
warn
(
"Could not get Json content from the response"
);
// Set the default Cause
response_data
[
"error"
][
"cause"
]
=
"504 Gateway Timeout"
;
}
std
::
string
cause
=
response_data
[
"error"
][
"cause"
];
Logger
::
amf_n11
().
warn
(
"Call Network Function services failure (with cause %s)"
,
cause
.
c_str
());
if
(
!
cause
.
compare
(
"DNN_DENIED"
))
Logger
::
amf_n11
().
debug
(
"Get response with jsonData: %s"
,
json_data_response
.
c_str
());
msg_str_2_msg_hex
(
n1sm
,
n1sm_hex
);
print_buffer
(
"amf_n11"
,
"Get response with n1sm:"
,
(
uint8_t
*
)
bdata
(
n1sm_hex
),
blength
(
n1sm_hex
));
std
::
string
cause
=
response_data
[
"error"
][
"cause"
];
Logger
::
amf_n11
().
debug
(
"Call Network Function services failure (with cause %s)"
,
cause
.
c_str
());
// if (!cause.compare("DNN_DENIED"))
handle_post_sm_context_response_error
(
httpCode
,
cause
,
n1sm_hex
,
supi
,
pdu_session_id
);
}
}
else
{
// Response with success code
// Store location of the created context in case of PDU Session
// Establishment
...
...
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