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
5ba269dd
Commit
5ba269dd
authored
Jan 28, 2021
by
yangjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update UDR: logger and SequenceNumber
parent
096a3f97
Changes
20
Show whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
232 additions
and
139 deletions
+232
-139
src/api/AMF3GPPAccessRegistrationDocumentApi.cpp
src/api/AMF3GPPAccessRegistrationDocumentApi.cpp
+15
-11
src/api/AccessAndMobilitySubscriptionDataDocumentApi.cpp
src/api/AccessAndMobilitySubscriptionDataDocumentApi.cpp
+7
-5
src/api/AuthenticationStatusDocumentApi.cpp
src/api/AuthenticationStatusDocumentApi.cpp
+17
-13
src/api/SDMSubscriptionDocumentApi.cpp
src/api/SDMSubscriptionDocumentApi.cpp
+20
-11
src/api/SDMSubscriptionsCollectionApi.cpp
src/api/SDMSubscriptionsCollectionApi.cpp
+13
-8
src/api/SMFRegistrationDocumentApi.cpp
src/api/SMFRegistrationDocumentApi.cpp
+16
-9
src/api/SMFRegistrationsCollectionApi.cpp
src/api/SMFRegistrationsCollectionApi.cpp
+7
-5
src/api/SMFSelectionSubscriptionDataDocumentApi.cpp
src/api/SMFSelectionSubscriptionDataDocumentApi.cpp
+7
-5
src/api/SessionManagementSubscriptionDataApi.cpp
src/api/SessionManagementSubscriptionDataApi.cpp
+8
-5
src/impl/AMF3GPPAccessRegistrationDocumentApiImpl.cpp
src/impl/AMF3GPPAccessRegistrationDocumentApiImpl.cpp
+13
-6
src/impl/AccessAndMobilitySubscriptionDataDocumentApiImpl.cpp
...impl/AccessAndMobilitySubscriptionDataDocumentApiImpl.cpp
+7
-3
src/impl/AuthenticationStatusDocumentApiImpl.cpp
src/impl/AuthenticationStatusDocumentApiImpl.cpp
+9
-7
src/impl/SDMSubscriptionDocumentApiImpl.cpp
src/impl/SDMSubscriptionDocumentApiImpl.cpp
+22
-9
src/impl/SDMSubscriptionsCollectionApiImpl.cpp
src/impl/SDMSubscriptionsCollectionApiImpl.cpp
+13
-5
src/impl/SMFRegistrationDocumentApiImpl.cpp
src/impl/SMFRegistrationDocumentApiImpl.cpp
+15
-7
src/impl/SMFRegistrationsCollectionApiImpl.cpp
src/impl/SMFRegistrationsCollectionApiImpl.cpp
+6
-2
src/impl/SMFSelectionSubscriptionDataDocumentApiImpl.cpp
src/impl/SMFSelectionSubscriptionDataDocumentApiImpl.cpp
+7
-3
src/impl/SessionManagementSubscriptionDataApiImpl.cpp
src/impl/SessionManagementSubscriptionDataApiImpl.cpp
+7
-3
src/model/SequenceNumber.cpp
src/model/SequenceNumber.cpp
+11
-10
src/model/SequenceNumber.h
src/model/SequenceNumber.h
+12
-12
No files found.
src/api/AMF3GPPAccessRegistrationDocumentApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "AMF3GPPAccessRegistrationDocumentApi.h"
#include "AMF3GPPAccessRegistrationDocumentApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -41,6 +42,7 @@ void AMF3GPPAccessRegistrationDocumentApi::setupRoutes() {
...
@@ -41,6 +42,7 @@ void AMF3GPPAccessRegistrationDocumentApi::setupRoutes() {
}
}
void
AMF3GPPAccessRegistrationDocumentApi
::
amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
AMF3GPPAccessRegistrationDocumentApi
::
amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AMF3GPPAccessRegistration Method: PATCH!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
@@ -75,6 +77,7 @@ void AMF3GPPAccessRegistrationDocumentApi::amf_context3gpp_handler(const Pistach
...
@@ -75,6 +77,7 @@ void AMF3GPPAccessRegistrationDocumentApi::amf_context3gpp_handler(const Pistach
}
}
void
AMF3GPPAccessRegistrationDocumentApi
::
create_amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
AMF3GPPAccessRegistrationDocumentApi
::
create_amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AMF3GPPAccessRegistration Method: PUT!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
@@ -100,6 +103,7 @@ void AMF3GPPAccessRegistrationDocumentApi::create_amf_context3gpp_handler(const
...
@@ -100,6 +103,7 @@ void AMF3GPPAccessRegistrationDocumentApi::create_amf_context3gpp_handler(const
}
}
void
AMF3GPPAccessRegistrationDocumentApi
::
query_amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
AMF3GPPAccessRegistrationDocumentApi
::
query_amf_context3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AMF3GPPAccessRegistration Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
...
src/api/AccessAndMobilitySubscriptionDataDocumentApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "AccessAndMobilitySubscriptionDataDocumentApi.h"
#include "AccessAndMobilitySubscriptionDataDocumentApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -39,6 +40,7 @@ void AccessAndMobilitySubscriptionDataDocumentApi::setupRoutes() {
...
@@ -39,6 +40,7 @@ void AccessAndMobilitySubscriptionDataDocumentApi::setupRoutes() {
}
}
void
AccessAndMobilitySubscriptionDataDocumentApi
::
query_am_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
AccessAndMobilitySubscriptionDataDocumentApi
::
query_am_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"AccessAndMobilitySubscriptionData Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
...
...
src/api/AuthenticationStatusDocumentApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "AuthenticationStatusDocumentApi.h"
#include "AuthenticationStatusDocumentApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -44,6 +45,7 @@ void AuthenticationStatusDocumentApi::setupRoutes() {
...
@@ -44,6 +45,7 @@ void AuthenticationStatusDocumentApi::setupRoutes() {
void
AuthenticationStatusDocumentApi
::
create_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
void
AuthenticationStatusDocumentApi
::
create_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
{
Logger
::
udr_server
().
info
(
"AuthenticationStatus Method: PUT!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
@@ -74,6 +76,7 @@ void AuthenticationStatusDocumentApi::create_authentication_status_handler(const
...
@@ -74,6 +76,7 @@ void AuthenticationStatusDocumentApi::create_authentication_status_handler(const
void
AuthenticationStatusDocumentApi
::
delete_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
void
AuthenticationStatusDocumentApi
::
delete_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
{
Logger
::
udr_server
().
info
(
"AuthenticationStatus Method: DELETE!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
@@ -95,6 +98,7 @@ void AuthenticationStatusDocumentApi::delete_authentication_status_handler(const
...
@@ -95,6 +98,7 @@ void AuthenticationStatusDocumentApi::delete_authentication_status_handler(const
}
}
void
AuthenticationStatusDocumentApi
::
query_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
void
AuthenticationStatusDocumentApi
::
query_authentication_status_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
{
Logger
::
udr_server
().
info
(
"AuthenticationStatus Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
...
src/api/SDMSubscriptionDocumentApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "SDMSubscriptionDocumentApi.h"
#include "SDMSubscriptionDocumentApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -42,6 +43,8 @@ void SDMSubscriptionDocumentApi::setupRoutes() {
...
@@ -42,6 +43,8 @@ void SDMSubscriptionDocumentApi::setupRoutes() {
}
}
void
SDMSubscriptionDocumentApi
::
modifysdm_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SDMSubscriptionDocumentApi
::
modifysdm_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: PATCH!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
...
@@ -77,6 +80,8 @@ void SDMSubscriptionDocumentApi::modifysdm_subscription_handler(const Pistache::
...
@@ -77,6 +80,8 @@ void SDMSubscriptionDocumentApi::modifysdm_subscription_handler(const Pistache::
}
}
void
SDMSubscriptionDocumentApi
::
querysdm_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SDMSubscriptionDocumentApi
::
querysdm_subscription_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
...
@@ -98,6 +103,8 @@ void SDMSubscriptionDocumentApi::querysdm_subscription_handler(const Pistache::R
...
@@ -98,6 +103,8 @@ void SDMSubscriptionDocumentApi::querysdm_subscription_handler(const Pistache::R
}
}
void
SDMSubscriptionDocumentApi
::
removesdm_subscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SDMSubscriptionDocumentApi
::
removesdm_subscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: DELETE!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
...
@@ -119,6 +126,8 @@ void SDMSubscriptionDocumentApi::removesdm_subscriptions_handler(const Pistache:
...
@@ -119,6 +126,8 @@ void SDMSubscriptionDocumentApi::removesdm_subscriptions_handler(const Pistache:
}
}
void
SDMSubscriptionDocumentApi
::
updatesdmsubscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SDMSubscriptionDocumentApi
::
updatesdmsubscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscription Method: PUT!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
auto
subsId
=
request
.
param
(
":subsId"
).
as
<
std
::
string
>
();
...
...
src/api/SDMSubscriptionsCollectionApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "SDMSubscriptionsCollectionApi.h"
#include "SDMSubscriptionsCollectionApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -40,6 +41,8 @@ void SDMSubscriptionsCollectionApi::setupRoutes() {
...
@@ -40,6 +41,8 @@ void SDMSubscriptionsCollectionApi::setupRoutes() {
}
}
void
SDMSubscriptionsCollectionApi
::
create_sdm_subscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SDMSubscriptionsCollectionApi
::
create_sdm_subscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscriptions Method: POST!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
@@ -65,6 +68,8 @@ void SDMSubscriptionsCollectionApi::create_sdm_subscriptions_handler(const Pista
...
@@ -65,6 +68,8 @@ void SDMSubscriptionsCollectionApi::create_sdm_subscriptions_handler(const Pista
}
}
void
SDMSubscriptionsCollectionApi
::
querysdmsubscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SDMSubscriptionsCollectionApi
::
querysdmsubscriptions_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SDMSubscriptions Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
...
src/api/SMFRegistrationDocumentApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "SMFRegistrationDocumentApi.h"
#include "SMFRegistrationDocumentApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -41,6 +42,8 @@ void SMFRegistrationDocumentApi::setupRoutes() {
...
@@ -41,6 +42,8 @@ void SMFRegistrationDocumentApi::setupRoutes() {
}
}
void
SMFRegistrationDocumentApi
::
create_smf_context_non3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SMFRegistrationDocumentApi
::
create_smf_context_non3gpp_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistration Method: PUT!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
...
@@ -67,6 +70,8 @@ void SMFRegistrationDocumentApi::create_smf_context_non3gpp_handler(const Pistac
...
@@ -67,6 +70,8 @@ void SMFRegistrationDocumentApi::create_smf_context_non3gpp_handler(const Pistac
}
}
void
SMFRegistrationDocumentApi
::
delete_smf_context_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SMFRegistrationDocumentApi
::
delete_smf_context_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistration Method: DELETE!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
...
@@ -88,6 +93,8 @@ void SMFRegistrationDocumentApi::delete_smf_context_handler(const Pistache::Rest
...
@@ -88,6 +93,8 @@ void SMFRegistrationDocumentApi::delete_smf_context_handler(const Pistache::Rest
}
}
void
SMFRegistrationDocumentApi
::
query_smf_registration_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SMFRegistrationDocumentApi
::
query_smf_registration_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistration Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
auto
pduSessionId
=
request
.
param
(
":pduSessionId"
).
as
<
int32_t
>
();
...
...
src/api/SMFRegistrationsCollectionApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "SMFRegistrationsCollectionApi.h"
#include "SMFRegistrationsCollectionApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -39,6 +40,7 @@ void SMFRegistrationsCollectionApi::setupRoutes() {
...
@@ -39,6 +40,7 @@ void SMFRegistrationsCollectionApi::setupRoutes() {
}
}
void
SMFRegistrationsCollectionApi
::
query_smf_reg_list_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SMFRegistrationsCollectionApi
::
query_smf_reg_list_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFRegistrations Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
...
...
src/api/SMFSelectionSubscriptionDataDocumentApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "SMFSelectionSubscriptionDataDocumentApi.h"
#include "SMFSelectionSubscriptionDataDocumentApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -39,6 +40,7 @@ void SMFSelectionSubscriptionDataDocumentApi::setupRoutes() {
...
@@ -39,6 +40,7 @@ void SMFSelectionSubscriptionDataDocumentApi::setupRoutes() {
}
}
void
SMFSelectionSubscriptionDataDocumentApi
::
query_smf_select_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SMFSelectionSubscriptionDataDocumentApi
::
query_smf_select_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SMFSelectionSubscriptionData Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
...
...
src/api/SessionManagementSubscriptionDataApi.cpp
View file @
5ba269dd
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
#include "SessionManagementSubscriptionDataApi.h"
#include "SessionManagementSubscriptionDataApi.h"
#include "Helpers.h"
#include "Helpers.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -39,6 +40,8 @@ void SessionManagementSubscriptionDataApi::setupRoutes() {
...
@@ -39,6 +40,8 @@ void SessionManagementSubscriptionDataApi::setupRoutes() {
}
}
void
SessionManagementSubscriptionDataApi
::
query_sm_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
void
SessionManagementSubscriptionDataApi
::
query_sm_data_handler
(
const
Pistache
::
Rest
::
Request
&
request
,
Pistache
::
Http
::
ResponseWriter
response
)
{
Logger
::
udr_server
().
info
(
"SessionManagementSubscriptionData Method: GET!"
);
// Getting the path params
// Getting the path params
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
ueId
=
request
.
param
(
":ueId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
auto
servingPlmnId
=
request
.
param
(
":servingPlmnId"
).
as
<
std
::
string
>
();
...
...
src/impl/AMF3GPPAccessRegistrationDocumentApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "AMF3GPPAccessRegistrationDocumentApiImpl.h"
#include "AMF3GPPAccessRegistrationDocumentApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -47,14 +48,14 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std:
...
@@ -47,14 +48,14 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std:
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_AMF3GPPAccessRegistration
.
c_str
(),
(
unsigned
long
)
select_AMF3GPPAccessRegistration
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_AMF3GPPAccessRegistration
.
c_str
(),
(
unsigned
long
)
select_AMF3GPPAccessRegistration
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
select_AMF3GPPAccessRegistration
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
select_AMF3GPPAccessRegistration
.
c_str
())
;
return
;
return
;
}
}
if
(
mysql_num_rows
(
res
))
if
(
mysql_num_rows
(
res
))
...
@@ -192,13 +193,16 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std:
...
@@ -192,13 +193,16 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::create_amf_context3gpp(const std:
// std::cout << query << std::endl;
// std::cout << query << std::endl;
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
to_json
(
j
,
amf3GppAccessRegistration
);
to_json
(
j
,
amf3GppAccessRegistration
);
response
.
send
(
Pistache
::
Http
::
Code
::
Created
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Created
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"Amf3GppAccessRegistration PUT - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
void
AMF3GPPAccessRegistrationDocumentApiImpl
::
query_amf_context3gpp
(
const
std
::
string
&
ueId
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
fields
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
void
AMF3GPPAccessRegistrationDocumentApiImpl
::
query_amf_context3gpp
(
const
std
::
string
&
ueId
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
fields
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
MYSQL_RES
*
res
=
NULL
;
MYSQL_RES
*
res
=
NULL
;
...
@@ -212,14 +216,14 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
...
@@ -212,14 +216,14 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
...
@@ -356,10 +360,13 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
...
@@ -356,10 +360,13 @@ void AMF3GPPAccessRegistrationDocumentApiImpl::query_amf_context3gpp(const std::
}
}
to_json
(
j
,
amf3gppaccessregistration
);
to_json
(
j
,
amf3gppaccessregistration
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"Amf3GppAccessRegistration GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
else
else
{
{
std
::
cout
<<
"Amf3GppAccessRegistration no data!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"Amf3GppAccessRegistration no data!SQL(%s)"
,
query
.
c_str
())
;
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
...
src/impl/AccessAndMobilitySubscriptionDataDocumentApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "AccessAndMobilitySubscriptionDataDocumentApiImpl.h"
#include "AccessAndMobilitySubscriptionDataDocumentApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -37,14 +38,14 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(const std::
...
@@ -37,14 +38,14 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(const std::
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!"
)
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!"
)
;
return
;
return
;
}
}
...
@@ -340,10 +341,13 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(const std::
...
@@ -340,10 +341,13 @@ void AccessAndMobilitySubscriptionDataDocumentApiImpl::query_am_data(const std::
to_json
(
j
,
accessandmobilitysubscriptiondata
);
to_json
(
j
,
accessandmobilitysubscriptiondata
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"AccessAndMobilitySubscriptionData GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
else
else
{
{
std
::
cout
<<
"AuthenticationSubscription no data!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"AccessAndMobilitySubscriptionData no data!"
)
;
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
...
src/impl/AuthenticationStatusDocumentApiImpl.cpp
View file @
5ba269dd
...
@@ -76,11 +76,11 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
...
@@ -76,11 +76,11 @@ void AuthenticationStatusDocumentApiImpl::create_authentication_status(const std
return
;
return
;
}
}
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
to_json
(
j
,
authEvent
);
to_json
(
j
,
authEvent
);
std
::
string
out
=
j
.
dump
();
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"AuthenticationSubscription PATCH - json:
\n\"
%s
\"
"
,
out
.
c_str
());
Logger
::
udr_server
().
debug
(
"AuthenticationStatus PUT - json:
\n\"
%s
\"
"
,
out
);
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
}
}
...
@@ -90,11 +90,13 @@ void AuthenticationStatusDocumentApiImpl::delete_authentication_status(const std
...
@@ -90,11 +90,13 @@ void AuthenticationStatusDocumentApiImpl::delete_authentication_status(const std
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
)
;
return
;
return
;
}
}
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
Logger
::
udr_server
().
debug
(
"AuthenticationStatus DELETE - successful"
);
}
}
void
AuthenticationStatusDocumentApiImpl
::
query_authentication_status
(
const
std
::
string
&
ueId
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
fields
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
void
AuthenticationStatusDocumentApiImpl
::
query_authentication_status
(
const
std
::
string
&
ueId
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
fields
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
MYSQL_RES
*
res
=
NULL
;
MYSQL_RES
*
res
=
NULL
;
...
@@ -108,14 +110,14 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
...
@@ -108,14 +110,14 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!"
)
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!"
)
;
return
;
return
;
}
}
...
@@ -166,7 +168,7 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
...
@@ -166,7 +168,7 @@ void AuthenticationStatusDocumentApiImpl::query_authentication_status(const std:
}
}
else
else
{
{
std
::
cout
<<
"AuthenticationStatus no data!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"AuthenticationStatus no data!"
)
;
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
...
src/impl/SDMSubscriptionDocumentApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "SDMSubscriptionDocumentApiImpl.h"
#include "SDMSubscriptionDocumentApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -40,14 +41,15 @@ void SDMSubscriptionDocumentApiImpl::querysdm_subscription(const std::string &ue
...
@@ -40,14 +41,15 @@ void SDMSubscriptionDocumentApiImpl::querysdm_subscription(const std::string &ue
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
());
return
;
return
;
}
}
...
@@ -133,10 +135,13 @@ void SDMSubscriptionDocumentApiImpl::querysdm_subscription(const std::string &ue
...
@@ -133,10 +135,13 @@ void SDMSubscriptionDocumentApiImpl::querysdm_subscription(const std::string &ue
}
}
to_json
(
j
,
SdmSubscriptions
);
to_json
(
j
,
SdmSubscriptions
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SdmSubscription GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
else
else
{
{
std
::
cout
<<
"SdmSubscription no data!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"SdmSubscription no data!SQL(%s)"
,
query
.
c_str
())
;
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
@@ -154,7 +159,7 @@ void SDMSubscriptionDocumentApiImpl::removesdm_subscriptions(const std::string &
...
@@ -154,7 +159,7 @@ void SDMSubscriptionDocumentApiImpl::removesdm_subscriptions(const std::string &
{
{
problemdetails
.
setCause
(
"USER_NOT_FOUND"
);
problemdetails
.
setCause
(
"USER_NOT_FOUND"
);
to_json
(
j
,
problemdetails
);
to_json
(
j
,
problemdetails
);
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
return
;
return
;
}
}
...
@@ -163,7 +168,7 @@ void SDMSubscriptionDocumentApiImpl::removesdm_subscriptions(const std::string &
...
@@ -163,7 +168,7 @@ void SDMSubscriptionDocumentApiImpl::removesdm_subscriptions(const std::string &
{
{
problemdetails
.
setCause
(
"USER_NOT_FOUND"
);
problemdetails
.
setCause
(
"USER_NOT_FOUND"
);
to_json
(
j
,
problemdetails
);
to_json
(
j
,
problemdetails
);
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
return
;
return
;
}
}
...
@@ -179,12 +184,14 @@ void SDMSubscriptionDocumentApiImpl::removesdm_subscriptions(const std::string &
...
@@ -179,12 +184,14 @@ void SDMSubscriptionDocumentApiImpl::removesdm_subscriptions(const std::string &
{
{
problemdetails
.
setCause
(
"USER_NOT_FOUND"
);
problemdetails
.
setCause
(
"USER_NOT_FOUND"
);
to_json
(
j
,
problemdetails
);
to_json
(
j
,
problemdetails
);
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
return
;
return
;
}
}
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
Logger
::
udr_server
().
debug
(
"SdmSubscription DELETE - successful"
);
}
}
void
SDMSubscriptionDocumentApiImpl
::
updatesdmsubscriptions
(
const
std
::
string
&
ueId
,
const
std
::
string
&
subsId
,
SdmSubscription
&
sdmSubscription
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
void
SDMSubscriptionDocumentApiImpl
::
updatesdmsubscriptions
(
const
std
::
string
&
ueId
,
const
std
::
string
&
subsId
,
SdmSubscription
&
sdmSubscription
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
MYSQL_RES
*
res
=
NULL
;
MYSQL_RES
*
res
=
NULL
;
...
@@ -196,14 +203,14 @@ void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(const std::string &u
...
@@ -196,14 +203,14 @@ void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(const std::string &u
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_query
.
c_str
(),
(
unsigned
long
)
select_query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_query
.
c_str
(),
(
unsigned
long
)
select_query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
if
(
mysql_num_rows
(
res
))
if
(
mysql_num_rows
(
res
))
...
@@ -253,6 +260,7 @@ void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(const std::string &u
...
@@ -253,6 +260,7 @@ void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(const std::string &u
{
{
to_json
(
j
,
problemdetails
);
to_json
(
j
,
problemdetails
);
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Not_Found
,
j
.
dump
());
mysql_free_result
(
res
);
mysql_free_result
(
res
);
return
;
return
;
}
}
...
@@ -261,11 +269,16 @@ void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(const std::string &u
...
@@ -261,11 +269,16 @@ void SDMSubscriptionDocumentApiImpl::updatesdmsubscriptions(const std::string &u
// std::cout << query << std::endl;
// std::cout << query << std::endl;
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
());
return
;
return
;
}
}
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
to_json
(
j
,
sdmSubscription
);
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SdmSubscription PUT - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
}
}
...
...
src/impl/SDMSubscriptionsCollectionApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "SDMSubscriptionsCollectionApiImpl.h"
#include "SDMSubscriptionsCollectionApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -35,13 +36,13 @@ void SDMSubscriptionsCollectionApiImpl::create_sdm_subscriptions(const std::stri
...
@@ -35,13 +36,13 @@ void SDMSubscriptionsCollectionApiImpl::create_sdm_subscriptions(const std::stri
std
::
string
query
=
"SELECT subsId from SdmSubscriptions WHERE ueid='"
+
ueId
+
"'"
;
std
::
string
query
=
"SELECT subsId from SdmSubscriptions WHERE ueid='"
+
ueId
+
"'"
;
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
...
@@ -107,13 +108,16 @@ void SDMSubscriptionsCollectionApiImpl::create_sdm_subscriptions(const std::stri
...
@@ -107,13 +108,16 @@ void SDMSubscriptionsCollectionApiImpl::create_sdm_subscriptions(const std::stri
// std::cout << query << std::endl;
// std::cout << query << std::endl;
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
to_json
(
j
,
sdmSubscription
);
to_json
(
j
,
sdmSubscription
);
response
.
send
(
Pistache
::
Http
::
Code
::
Created
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Created
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SdmSubscriptions POST - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
void
SDMSubscriptionsCollectionApiImpl
::
querysdmsubscriptions
(
const
std
::
string
&
ueId
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
void
SDMSubscriptionsCollectionApiImpl
::
querysdmsubscriptions
(
const
std
::
string
&
ueId
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
MYSQL_RES
*
res
=
NULL
;
MYSQL_RES
*
res
=
NULL
;
...
@@ -127,14 +131,14 @@ void SDMSubscriptionsCollectionApiImpl::querysdmsubscriptions(const std::string
...
@@ -127,14 +131,14 @@ void SDMSubscriptionsCollectionApiImpl::querysdmsubscriptions(const std::string
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
...
@@ -235,6 +239,10 @@ void SDMSubscriptionsCollectionApiImpl::querysdmsubscriptions(const std::string
...
@@ -235,6 +239,10 @@ void SDMSubscriptionsCollectionApiImpl::querysdmsubscriptions(const std::string
mysql_free_result
(
res
);
mysql_free_result
(
res
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SdmSubscriptions GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
}
}
...
...
src/impl/SMFRegistrationDocumentApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "SMFRegistrationDocumentApiImpl.h"
#include "SMFRegistrationDocumentApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -34,14 +35,14 @@ void SMFRegistrationDocumentApiImpl::create_smf_context_non3gpp(const std::strin
...
@@ -34,14 +35,14 @@ void SMFRegistrationDocumentApiImpl::create_smf_context_non3gpp(const std::strin
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_SmfRegistration
.
c_str
(),
(
unsigned
long
)
select_SmfRegistration
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
select_SmfRegistration
.
c_str
(),
(
unsigned
long
)
select_SmfRegistration
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
select_SmfRegistration
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
select_SmfRegistration
.
c_str
())
;
return
;
return
;
}
}
if
(
mysql_num_rows
(
res
))
if
(
mysql_num_rows
(
res
))
...
@@ -112,23 +113,27 @@ void SMFRegistrationDocumentApiImpl::create_smf_context_non3gpp(const std::strin
...
@@ -112,23 +113,27 @@ void SMFRegistrationDocumentApiImpl::create_smf_context_non3gpp(const std::strin
// std::cout << query << std::endl;
// std::cout << query << std::endl;
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
to_json
(
j
,
smfRegistration
);
to_json
(
j
,
smfRegistration
);
response
.
send
(
Pistache
::
Http
::
Code
::
Created
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Created
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SmfRegistration PUT - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
void
SMFRegistrationDocumentApiImpl
::
delete_smf_context
(
const
std
::
string
&
ueId
,
const
int32_t
&
pduSessionId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
void
SMFRegistrationDocumentApiImpl
::
delete_smf_context
(
const
std
::
string
&
ueId
,
const
int32_t
&
pduSessionId
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
const
std
::
string
query
=
"DELETE from SmfRegistrations WHERE ueid='"
+
ueId
+
"' AND subpduSessionId="
+
std
::
to_string
(
pduSessionId
);
const
std
::
string
query
=
"DELETE from SmfRegistrations WHERE ueid='"
+
ueId
+
"' AND subpduSessionId="
+
std
::
to_string
(
pduSessionId
);
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
response
.
send
(
Pistache
::
Http
::
Code
::
No_Content
,
""
);
Logger
::
udr_server
().
debug
(
"SmfRegistration DELETE - successful"
);
}
}
void
SMFRegistrationDocumentApiImpl
::
query_smf_registration
(
const
std
::
string
&
ueId
,
const
int32_t
&
pduSessionId
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
fields
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
void
SMFRegistrationDocumentApiImpl
::
query_smf_registration
(
const
std
::
string
&
ueId
,
const
int32_t
&
pduSessionId
,
const
Pistache
::
Optional
<
std
::
vector
<
std
::
string
>>
&
fields
,
const
Pistache
::
Optional
<
std
::
string
>
&
supportedFeatures
,
Pistache
::
Http
::
ResponseWriter
&
response
)
{
MYSQL_RES
*
res
=
NULL
;
MYSQL_RES
*
res
=
NULL
;
...
@@ -142,14 +147,14 @@ void SMFRegistrationDocumentApiImpl::query_smf_registration(const std::string &u
...
@@ -142,14 +147,14 @@ void SMFRegistrationDocumentApiImpl::query_smf_registration(const std::string &u
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
...
@@ -241,10 +246,13 @@ void SMFRegistrationDocumentApiImpl::query_smf_registration(const std::string &u
...
@@ -241,10 +246,13 @@ void SMFRegistrationDocumentApiImpl::query_smf_registration(const std::string &u
}
}
to_json
(
j
,
smfregistration
);
to_json
(
j
,
smfregistration
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SmfRegistration GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
else
else
{
{
std
::
cout
<<
"SmfRegistration no data!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"SmfRegistration no data!SQL(%s)"
,
query
.
c_str
())
;
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
...
src/impl/SMFRegistrationsCollectionApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "SMFRegistrationsCollectionApiImpl.h"
#include "SMFRegistrationsCollectionApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -38,14 +39,14 @@ void SMFRegistrationsCollectionApiImpl::query_smf_reg_list(const std::string &ue
...
@@ -38,14 +39,14 @@ void SMFRegistrationsCollectionApiImpl::query_smf_reg_list(const std::string &ue
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
...
@@ -152,6 +153,9 @@ void SMFRegistrationsCollectionApiImpl::query_smf_reg_list(const std::string &ue
...
@@ -152,6 +153,9 @@ void SMFRegistrationsCollectionApiImpl::query_smf_reg_list(const std::string &ue
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SmfRegistrations GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
}
}
...
...
src/impl/SMFSelectionSubscriptionDataDocumentApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "SMFSelectionSubscriptionDataDocumentApiImpl.h"
#include "SMFSelectionSubscriptionDataDocumentApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -37,14 +38,14 @@ void SMFSelectionSubscriptionDataDocumentApiImpl::query_smf_select_data(const st
...
@@ -37,14 +38,14 @@ void SMFSelectionSubscriptionDataDocumentApiImpl::query_smf_select_data(const st
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
...
@@ -71,10 +72,13 @@ void SMFSelectionSubscriptionDataDocumentApiImpl::query_smf_select_data(const st
...
@@ -71,10 +72,13 @@ void SMFSelectionSubscriptionDataDocumentApiImpl::query_smf_select_data(const st
}
}
to_json
(
j
,
smfselectionsubscriptiondata
);
to_json
(
j
,
smfselectionsubscriptiondata
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SmfSelectionSubscriptionData GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
else
else
{
{
std
::
cout
<<
"SmfSelectionSubscriptionData no data!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"SmfSelectionSubscriptionData no data!SQL(%s)"
,
query
.
c_str
())
;
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
...
src/impl/SessionManagementSubscriptionDataApiImpl.cpp
View file @
5ba269dd
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
*/
*/
#include "SessionManagementSubscriptionDataApiImpl.h"
#include "SessionManagementSubscriptionDataApiImpl.h"
#include "logger.hpp"
namespace
org
{
namespace
org
{
namespace
openapitools
{
namespace
openapitools
{
...
@@ -39,14 +40,14 @@ void SessionManagementSubscriptionDataApiImpl::query_sm_data(const std::string &
...
@@ -39,14 +40,14 @@ void SessionManagementSubscriptionDataApiImpl::query_sm_data(const std::string &
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
if
(
mysql_real_query
(
mysql_WitcommUDRDB
,
query
.
c_str
(),
(
unsigned
long
)
query
.
size
()))
{
{
std
::
cout
<<
"mysql_real_query failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_real_query failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
res
=
mysql_store_result
(
mysql_WitcommUDRDB
);
if
(
res
==
NULL
)
if
(
res
==
NULL
)
{
{
std
::
cout
<<
"mysql_store_result failure!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"mysql_store_result failure!SQL(%s)"
,
query
.
c_str
())
;
return
;
return
;
}
}
...
@@ -119,10 +120,13 @@ void SessionManagementSubscriptionDataApiImpl::query_sm_data(const std::string &
...
@@ -119,10 +120,13 @@ void SessionManagementSubscriptionDataApiImpl::query_sm_data(const std::string &
}
}
to_json
(
j
,
sessionmanagementsubscriptiondata
);
to_json
(
j
,
sessionmanagementsubscriptiondata
);
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
response
.
send
(
Pistache
::
Http
::
Code
::
Ok
,
j
.
dump
());
std
::
string
out
=
j
.
dump
();
Logger
::
udr_server
().
debug
(
"SessionManagementSubscriptionData GET - json:
\n\"
%s
\"
"
,
out
.
c_str
());
}
}
else
else
{
{
std
::
cout
<<
"SessionManagementSubscriptionData no data!"
<<
std
::
endl
;
Logger
::
udr_server
().
error
(
"SessionManagementSubscriptionData no data!SQL(%s)"
,
query
.
c_str
())
;
}
}
mysql_free_result
(
res
);
mysql_free_result
(
res
);
...
...
src/model/SequenceNumber.cpp
View file @
5ba269dd
...
@@ -20,6 +20,7 @@ namespace model {
...
@@ -20,6 +20,7 @@ namespace model {
SequenceNumber
::
SequenceNumber
()
SequenceNumber
::
SequenceNumber
()
{
{
m_SqnScheme
=
""
;
m_SqnSchemeIsSet
=
false
;
m_SqnSchemeIsSet
=
false
;
m_Sqn
=
""
;
m_Sqn
=
""
;
m_SqnIsSet
=
false
;
m_SqnIsSet
=
false
;
...
@@ -83,11 +84,11 @@ void from_json(const nlohmann::json& j, SequenceNumber& o)
...
@@ -83,11 +84,11 @@ void from_json(const nlohmann::json& j, SequenceNumber& o)
}
}
}
}
SqnScheme
SequenceNumber
::
getSqnScheme
()
const
std
::
string
SequenceNumber
::
getSqnScheme
()
const
{
{
return
m_SqnScheme
;
return
m_SqnScheme
;
}
}
void
SequenceNumber
::
setSqnScheme
(
SqnScheme
const
&
value
)
void
SequenceNumber
::
setSqnScheme
(
std
::
string
const
&
value
)
{
{
m_SqnScheme
=
value
;
m_SqnScheme
=
value
;
m_SqnSchemeIsSet
=
true
;
m_SqnSchemeIsSet
=
true
;
...
...
src/model/SequenceNumber.h
View file @
5ba269dd
...
@@ -48,8 +48,8 @@ public:
...
@@ -48,8 +48,8 @@ public:
/// <summary>
/// <summary>
///
///
/// </summary>
/// </summary>
SqnScheme
getSqnScheme
()
const
;
std
::
string
getSqnScheme
()
const
;
void
setSqnScheme
(
SqnScheme
const
&
value
);
void
setSqnScheme
(
std
::
string
const
&
value
);
bool
sqnSchemeIsSet
()
const
;
bool
sqnSchemeIsSet
()
const
;
void
unsetSqnScheme
();
void
unsetSqnScheme
();
/// <summary>
/// <summary>
...
@@ -84,7 +84,7 @@ public:
...
@@ -84,7 +84,7 @@ public:
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
SequenceNumber
&
o
);
friend
void
to_json
(
nlohmann
::
json
&
j
,
const
SequenceNumber
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
SequenceNumber
&
o
);
friend
void
from_json
(
const
nlohmann
::
json
&
j
,
SequenceNumber
&
o
);
protected:
protected:
SqnScheme
m_SqnScheme
;
std
::
string
m_SqnScheme
;
bool
m_SqnSchemeIsSet
;
bool
m_SqnSchemeIsSet
;
std
::
string
m_Sqn
;
std
::
string
m_Sqn
;
bool
m_SqnIsSet
;
bool
m_SqnIsSet
;
...
...
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