Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-UDR
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-UDR
Commits
30df724e
Commit
30df724e
authored
Feb 28, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add debug info for AM Data Retrieval
parent
4e9a7410
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
src/udr_app/udr_app.cpp
src/udr_app/udr_app.cpp
+5
-7
No files found.
src/udr_app/udr_app.cpp
View file @
30df724e
...
...
@@ -94,9 +94,10 @@ void udr_app::handle_query_am_data(const std::string &ue_id,
MYSQL_FIELD
*
field
=
nullptr
;
nlohmann
::
json
j
=
{};
response_data
=
{};
oai
::
udr
::
model
::
AccessAndMobilitySubscriptionData
subscription_data
=
{};
Logger
::
udr_server
().
debug
(
"Handle Query AM Data request"
);
// TODO: Define query template in a header file
const
std
::
string
query
=
"select * from AccessAndMobilitySubscriptionData WHERE ueid='"
+
ue_id
+
...
...
@@ -104,7 +105,6 @@ void udr_app::handle_query_am_data(const std::string &ue_id,
if
(
mysql_real_query
(
&
mysql
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
Logger
::
udr_server
().
error
(
"mysql_real_query failure!"
);
// code = Pistache::Http::Code::Internal_Server_Error;
code
=
HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR
;
return
;
}
...
...
@@ -112,7 +112,6 @@ void udr_app::handle_query_am_data(const std::string &ue_id,
res
=
mysql_store_result
(
&
mysql
);
if
(
res
==
NULL
)
{
Logger
::
udr_server
().
error
(
"mysql_store_result failure!"
);
// code = Pistache::Http::Code::Internal_Server_Error;
code
=
HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR
;
return
;
}
...
...
@@ -321,15 +320,14 @@ void udr_app::handle_query_am_data(const std::string &ue_id,
to_json
(
j
,
subscription_data
);
response_data
=
j
;
// code = Pistache::Http::Code::Ok;
code
=
HTTP_STATUS_CODE_200_OK
;
Logger
::
udr_server
().
debug
(
"AccessAndMobilitySubscriptionData GET
- json:
\n\"
%s
\"
"
,
"AccessAndMobilitySubscriptionData GET
(JSON):
\n
%s
"
,
j
.
dump
().
c_str
());
}
else
{
Logger
::
udr_server
().
error
(
"AccessAndMobilitySubscriptionData no data!"
);
// code = Pistache::Http::Code::Internal_Server_Error
;
Logger
::
udr_server
().
error
(
"No data available for AccessAndMobilitySubscriptionData!"
)
;
code
=
HTTP_STATUS_CODE_500_INTERNAL_SERVER_ERROR
;
}
...
...
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