Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-AUSF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
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-AUSF
Commits
e11e05f5
Commit
e11e05f5
authored
May 26, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue when processing response from UDM
parent
f4ed3538
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
src/ausf_app/ausf_client.cpp
src/ausf_app/ausf_client.cpp
+5
-6
No files found.
src/ausf_app/ausf_client.cpp
View file @
e11e05f5
...
@@ -125,10 +125,9 @@ void ausf_client::curl_http_client(
...
@@ -125,10 +125,9 @@ void ausf_client::curl_http_client(
curl_easy_getinfo
(
curl
,
CURLINFO_RESPONSE_CODE
,
&
httpCode
);
curl_easy_getinfo
(
curl
,
CURLINFO_RESPONSE_CODE
,
&
httpCode
);
// get the response
// get the response
std
::
string
response
=
*
httpData
.
get
();
response
=
*
httpData
.
get
();
std
::
string
json_data_response
=
""
;
std
::
string
resMsg
=
""
;
std
::
string
resMsg
=
""
;
bool
is_response_ok
=
true
;
bool
is_response_ok
=
true
;
Logger
::
ausf_app
().
info
(
"Get response with httpcode (%d)"
,
httpCode
);
Logger
::
ausf_app
().
info
(
"Get response with httpcode (%d)"
,
httpCode
);
if
(
httpCode
==
0
)
{
if
(
httpCode
==
0
)
{
...
@@ -160,7 +159,7 @@ void ausf_client::curl_http_client(
...
@@ -160,7 +159,7 @@ void ausf_client::curl_http_client(
if
(
!
is_response_ok
)
{
if
(
!
is_response_ok
)
{
try
{
try
{
response_data
=
nlohmann
::
json
::
parse
(
json_data_
response
);
response_data
=
nlohmann
::
json
::
parse
(
response
);
}
catch
(
nlohmann
::
json
::
exception
&
e
)
{
}
catch
(
nlohmann
::
json
::
exception
&
e
)
{
Logger
::
ausf_app
().
info
(
"Could not get Json content from the response"
);
Logger
::
ausf_app
().
info
(
"Could not get Json content from the response"
);
// Set the default Cause
// Set the default Cause
...
@@ -168,7 +167,7 @@ void ausf_client::curl_http_client(
...
@@ -168,7 +167,7 @@ void ausf_client::curl_http_client(
}
}
Logger
::
ausf_app
().
info
(
Logger
::
ausf_app
().
info
(
"Get response with jsonData: %s"
,
json_data_
response
.
c_str
());
"Get response with jsonData: %s"
,
response
.
c_str
());
std
::
string
cause
=
response_data
[
"error"
][
"cause"
];
std
::
string
cause
=
response_data
[
"error"
][
"cause"
];
Logger
::
ausf_app
().
info
(
"Call Network Function services failure"
);
Logger
::
ausf_app
().
info
(
"Call Network Function services failure"
);
...
...
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