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
b746a091
Commit
b746a091
authored
Jun 24, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
code cleanup
parent
af937a8b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
93 deletions
+64
-93
src/udr_app/udr_app.cpp
src/udr_app/udr_app.cpp
+64
-93
No files found.
src/udr_app/udr_app.cpp
View file @
b746a091
...
...
@@ -82,8 +82,7 @@ void udr_app::handle_query_am_data(const std::string &ue_id,
nlohmann
::
json
j
=
{};
response_data
=
{};
oai
::
udr
::
model
::
AccessAndMobilitySubscriptionData
accessandmobilitysubscriptiondata
;
oai
::
udr
::
model
::
AccessAndMobilitySubscriptionData
subscription_data
=
{};
// TODO: Define query template in a header file
const
std
::
string
query
=
...
...
@@ -109,208 +108,194 @@ void udr_app::handle_query_am_data(const std::string &ue_id,
for
(
int
i
=
0
;
field
=
mysql_fetch_field
(
res
);
i
++
)
{
try
{
if
(
!
strcmp
(
"supportedFeatures"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
accessandmobilitysubscription
data
.
setSupportedFeatures
(
row
[
i
]);
subscription_
data
.
setSupportedFeatures
(
row
[
i
]);
}
else
if
(
!
strcmp
(
"gpsis"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
std
::
string
>
gpsis
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
gpsis
);
accessandmobilitysubscription
data
.
setGpsis
(
gpsis
);
subscription_
data
.
setGpsis
(
gpsis
);
}
else
if
(
!
strcmp
(
"internalGroupIds"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
std
::
string
>
internalgroupids
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
internalgroupids
);
accessandmobilitysubscriptiondata
.
setInternalGroupIds
(
internalgroupids
);
subscription_data
.
setInternalGroupIds
(
internalgroupids
);
}
else
if
(
!
strcmp
(
"sharedVnGroupDataIds"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
map
<
std
::
string
,
std
::
string
>
sharedvngroupdataids
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
sharedvngroupdataids
);
accessandmobilitysubscriptiondata
.
setSharedVnGroupDataIds
(
sharedvngroupdataids
);
subscription_data
.
setSharedVnGroupDataIds
(
sharedvngroupdataids
);
}
else
if
(
!
strcmp
(
"subscribedUeAmbr"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
AmbrRm
subscribedueambr
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
subscribedueambr
);
accessandmobilitysubscriptiondata
.
setSubscribedUeAmbr
(
subscribedueambr
);
subscription_data
.
setSubscribedUeAmbr
(
subscribedueambr
);
}
else
if
(
!
strcmp
(
"nssai"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
Nssai
nssai
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
nssai
);
accessandmobilitysubscription
data
.
setNssai
(
nssai
);
subscription_
data
.
setNssai
(
nssai
);
}
else
if
(
!
strcmp
(
"ratRestrictions"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
RatType
>
ratrestrictions
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
ratrestrictions
);
accessandmobilitysubscription
data
.
setRatRestrictions
(
ratrestrictions
);
subscription_
data
.
setRatRestrictions
(
ratrestrictions
);
}
else
if
(
!
strcmp
(
"forbiddenAreas"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
Area
>
forbiddenareas
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
forbiddenareas
);
accessandmobilitysubscription
data
.
setForbiddenAreas
(
forbiddenareas
);
subscription_
data
.
setForbiddenAreas
(
forbiddenareas
);
}
else
if
(
!
strcmp
(
"serviceAreaRestriction"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
ServiceAreaRestriction
servicearearestriction
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
servicearearestriction
);
accessandmobilitysubscriptiondata
.
setServiceAreaRestriction
(
servicearearestriction
);
subscription_data
.
setServiceAreaRestriction
(
servicearearestriction
);
}
else
if
(
!
strcmp
(
"coreNetworkTypeRestrictions"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
CoreNetworkType
>
corenetworktyperestrictions
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
corenetworktyperestrictions
);
accessandmobilitysubscription
data
.
setCoreNetworkTypeRestrictions
(
subscription_
data
.
setCoreNetworkTypeRestrictions
(
corenetworktyperestrictions
);
}
else
if
(
!
strcmp
(
"rfspIndex"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
int32_t
a
=
std
::
stoi
(
row
[
i
]);
accessandmobilitysubscription
data
.
setRfspIndex
(
a
);
subscription_
data
.
setRfspIndex
(
a
);
}
else
if
(
!
strcmp
(
"subsRegTimer"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
int32_t
a
=
std
::
stoi
(
row
[
i
]);
accessandmobilitysubscription
data
.
setSubsRegTimer
(
a
);
subscription_
data
.
setSubsRegTimer
(
a
);
}
else
if
(
!
strcmp
(
"ueUsageType"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
int32_t
a
=
std
::
stoi
(
row
[
i
]);
accessandmobilitysubscription
data
.
setUeUsageType
(
a
);
subscription_
data
.
setUeUsageType
(
a
);
}
else
if
(
!
strcmp
(
"mpsPriority"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setMpsPriority
(
true
);
subscription_
data
.
setMpsPriority
(
true
);
else
accessandmobilitysubscription
data
.
setMpsPriority
(
false
);
subscription_
data
.
setMpsPriority
(
false
);
}
else
if
(
!
strcmp
(
"mcsPriority"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setMcsPriority
(
true
);
subscription_
data
.
setMcsPriority
(
true
);
else
accessandmobilitysubscription
data
.
setMcsPriority
(
false
);
subscription_
data
.
setMcsPriority
(
false
);
}
else
if
(
!
strcmp
(
"activeTime"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
int32_t
a
=
std
::
stoi
(
row
[
i
]);
accessandmobilitysubscription
data
.
setActiveTime
(
a
);
subscription_
data
.
setActiveTime
(
a
);
}
else
if
(
!
strcmp
(
"sorInfo"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
SorInfo
sorinfo
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
sorinfo
);
accessandmobilitysubscription
data
.
setSorInfo
(
sorinfo
);
subscription_
data
.
setSorInfo
(
sorinfo
);
}
else
if
(
!
strcmp
(
"sorInfoExpectInd"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setSorInfoExpectInd
(
true
);
subscription_
data
.
setSorInfoExpectInd
(
true
);
else
accessandmobilitysubscription
data
.
setSorInfoExpectInd
(
false
);
subscription_
data
.
setSorInfoExpectInd
(
false
);
}
else
if
(
!
strcmp
(
"sorafRetrieval"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setSorafRetrieval
(
true
);
subscription_
data
.
setSorafRetrieval
(
true
);
else
accessandmobilitysubscription
data
.
setSorafRetrieval
(
false
);
subscription_
data
.
setSorafRetrieval
(
false
);
}
else
if
(
!
strcmp
(
"sorUpdateIndicatorList"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
SorUpdateIndicator
>
sorupdateindicatorlist
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
sorupdateindicatorlist
);
accessandmobilitysubscriptiondata
.
setSorUpdateIndicatorList
(
sorupdateindicatorlist
);
subscription_data
.
setSorUpdateIndicatorList
(
sorupdateindicatorlist
);
}
else
if
(
!
strcmp
(
"upuInfo"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
UpuInfo
upuinfo
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
upuinfo
);
accessandmobilitysubscription
data
.
setUpuInfo
(
upuinfo
);
subscription_
data
.
setUpuInfo
(
upuinfo
);
}
else
if
(
!
strcmp
(
"micoAllowed"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setMicoAllowed
(
true
);
subscription_
data
.
setMicoAllowed
(
true
);
else
accessandmobilitysubscription
data
.
setMicoAllowed
(
false
);
subscription_
data
.
setMicoAllowed
(
false
);
}
else
if
(
!
strcmp
(
"sharedAmDataIds"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
std
::
string
>
sharedamdataids
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
sharedamdataids
);
accessandmobilitysubscription
data
.
setSharedAmDataIds
(
sharedamdataids
);
subscription_
data
.
setSharedAmDataIds
(
sharedamdataids
);
}
else
if
(
!
strcmp
(
"odbPacketServices"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
OdbPacketServices
odbpacketservices
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
odbpacketservices
);
accessandmobilitysubscriptiondata
.
setOdbPacketServices
(
odbpacketservices
);
subscription_data
.
setOdbPacketServices
(
odbpacketservices
);
}
else
if
(
!
strcmp
(
"serviceGapTime"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
int32_t
a
=
std
::
stoi
(
row
[
i
]);
accessandmobilitysubscription
data
.
setServiceGapTime
(
a
);
subscription_
data
.
setServiceGapTime
(
a
);
}
else
if
(
!
strcmp
(
"mdtUserConsent"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
MdtUserConsent
mdtuserconsent
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
mdtuserconsent
);
accessandmobilitysubscription
data
.
setMdtUserConsent
(
mdtuserconsent
);
subscription_
data
.
setMdtUserConsent
(
mdtuserconsent
);
}
else
if
(
!
strcmp
(
"mdtConfiguration"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
MdtConfiguration
mdtconfiguration
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
mdtconfiguration
);
accessandmobilitysubscriptiondata
.
setMdtConfiguration
(
mdtconfiguration
);
subscription_data
.
setMdtConfiguration
(
mdtconfiguration
);
}
else
if
(
!
strcmp
(
"traceData"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
TraceData
tracedata
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
tracedata
);
accessandmobilitysubscription
data
.
setTraceData
(
tracedata
);
subscription_
data
.
setTraceData
(
tracedata
);
}
else
if
(
!
strcmp
(
"cagData"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
CagData
cagdata
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
cagdata
);
accessandmobilitysubscription
data
.
setCagData
(
cagdata
);
subscription_
data
.
setCagData
(
cagdata
);
}
else
if
(
!
strcmp
(
"stnSr"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
accessandmobilitysubscription
data
.
setStnSr
(
row
[
i
]);
subscription_
data
.
setStnSr
(
row
[
i
]);
}
else
if
(
!
strcmp
(
"cMsisdn"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
accessandmobilitysubscription
data
.
setCMsisdn
(
row
[
i
]);
subscription_
data
.
setCMsisdn
(
row
[
i
]);
}
else
if
(
!
strcmp
(
"nbIoTUePriority"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
int32_t
a
=
std
::
stoi
(
row
[
i
]);
accessandmobilitysubscription
data
.
setNbIoTUePriority
(
a
);
subscription_
data
.
setNbIoTUePriority
(
a
);
}
else
if
(
!
strcmp
(
"nssaiInclusionAllowed"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setNssaiInclusionAllowed
(
true
);
subscription_
data
.
setNssaiInclusionAllowed
(
true
);
else
accessandmobilitysubscription
data
.
setNssaiInclusionAllowed
(
false
);
subscription_
data
.
setNssaiInclusionAllowed
(
false
);
}
else
if
(
!
strcmp
(
"rgWirelineCharacteristics"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
accessandmobilitysubscriptiondata
.
setRgWirelineCharacteristics
(
row
[
i
]);
subscription_data
.
setRgWirelineCharacteristics
(
row
[
i
]);
}
else
if
(
!
strcmp
(
"ecRestrictionDataWb"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
EcRestrictionDataWb
ecrestrictiondatawb
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
ecrestrictiondatawb
);
accessandmobilitysubscriptiondata
.
setEcRestrictionDataWb
(
ecrestrictiondatawb
);
subscription_data
.
setEcRestrictionDataWb
(
ecrestrictiondatawb
);
}
else
if
(
!
strcmp
(
"ecRestrictionDataNb"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setEcRestrictionDataNb
(
true
);
subscription_
data
.
setEcRestrictionDataNb
(
true
);
else
accessandmobilitysubscription
data
.
setEcRestrictionDataNb
(
false
);
subscription_
data
.
setEcRestrictionDataNb
(
false
);
}
else
if
(
!
strcmp
(
"expectedUeBehaviourList"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
ExpectedUeBehaviourData
expecteduebehaviourlist
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
expecteduebehaviourlist
);
accessandmobilitysubscriptiondata
.
setExpectedUeBehaviourList
(
expecteduebehaviourlist
);
subscription_data
.
setExpectedUeBehaviourList
(
expecteduebehaviourlist
);
}
else
if
(
!
strcmp
(
"primaryRatRestrictions"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
RatType
>
primaryratrestrictions
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
primaryratrestrictions
);
accessandmobilitysubscriptiondata
.
setPrimaryRatRestrictions
(
primaryratrestrictions
);
subscription_data
.
setPrimaryRatRestrictions
(
primaryratrestrictions
);
}
else
if
(
!
strcmp
(
"secondaryRatRestrictions"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
RatType
>
secondaryratrestrictions
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
secondaryratrestrictions
);
accessandmobilitysubscription
data
.
setSecondaryRatRestrictions
(
subscription_
data
.
setSecondaryRatRestrictions
(
secondaryratrestrictions
);
}
else
if
(
!
strcmp
(
"edrxParametersList"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
EdrxParameters
>
edrxparameterslist
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
edrxparameterslist
);
accessandmobilitysubscriptiondata
.
setEdrxParametersList
(
edrxparameterslist
);
subscription_data
.
setEdrxParametersList
(
edrxparameterslist
);
}
else
if
(
!
strcmp
(
"ptwParametersList"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
PtwParameters
>
ptwparameterslist
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
ptwparameterslist
);
accessandmobilitysubscriptiondata
.
setPtwParametersList
(
ptwparameterslist
);
subscription_data
.
setPtwParametersList
(
ptwparameterslist
);
}
else
if
(
!
strcmp
(
"iabOperationAllowed"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
if
(
strcmp
(
row
[
i
],
"0"
))
accessandmobilitysubscription
data
.
setIabOperationAllowed
(
true
);
subscription_
data
.
setIabOperationAllowed
(
true
);
else
accessandmobilitysubscription
data
.
setIabOperationAllowed
(
false
);
subscription_
data
.
setIabOperationAllowed
(
false
);
}
else
if
(
!
strcmp
(
"wirelineForbiddenAreas"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
std
::
vector
<
WirelineArea
>
wirelineforbiddenareas
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
wirelineforbiddenareas
);
accessandmobilitysubscriptiondata
.
setWirelineForbiddenAreas
(
wirelineforbiddenareas
);
subscription_data
.
setWirelineForbiddenAreas
(
wirelineforbiddenareas
);
}
else
if
(
!
strcmp
(
"wirelineServiceAreaRestriction"
,
field
->
name
)
&&
row
[
i
]
!=
NULL
)
{
WirelineServiceAreaRestriction
wirelineservicearearestriction
;
nlohmann
::
json
::
parse
(
row
[
i
]).
get_to
(
wirelineservicearearestriction
);
accessandmobilitysubscription
data
.
setWirelineServiceAreaRestriction
(
subscription_
data
.
setWirelineServiceAreaRestriction
(
wirelineservicearearestriction
);
}
}
catch
(
std
::
exception
e
)
{
...
...
@@ -319,7 +304,7 @@ void udr_app::handle_query_am_data(const std::string &ue_id,
}
}
to_json
(
j
,
accessandmobilitysubscription
data
);
to_json
(
j
,
subscription_
data
);
response_data
=
j
;
code
=
Pistache
::
Http
::
Code
::
Ok
;
...
...
@@ -340,13 +325,13 @@ void udr_app::handle_create_amf_context_3gpp(
Amf3GppAccessRegistration
&
amf3GppAccessRegistration
,
nlohmann
::
json
&
response_data
,
Pistache
::
Http
::
Code
&
code
)
{
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
;
MYSQL_ROW
row
=
{}
;
const
std
::
string
select_AMF3GPPAccessRegistration
=
"select * from Amf3GppAccessRegistration WHERE ueid='"
+
ue_id
+
"'"
;
std
::
string
query
;
std
::
string
query
=
{}
;
nlohmann
::
json
j
;
nlohmann
::
json
j
=
{}
;
if
(
mysql_real_query
(
&
mysql
,
select_AMF3GPPAccessRegistration
.
c_str
(),
...
...
@@ -800,10 +785,8 @@ void udr_app::handle_query_authentication_status(const std::string &ue_id,
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
MYSQL_FIELD
*
field
=
nullptr
;
nlohmann
::
json
j
=
{};
AuthEvent
authenticationstatus
;
AuthEvent
authenticationstatus
=
{};
const
std
::
string
query
=
"select * from AuthenticationStatus WHERE ueid='"
+
ue_id
+
"'"
;
...
...
@@ -935,7 +918,6 @@ void udr_app::handle_read_authentication_subscription(
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
MYSQL_FIELD
*
field
=
nullptr
;
nlohmann
::
json
j
=
{};
AuthenticationSubscription
authenticationsubscription
;
...
...
@@ -1026,10 +1008,8 @@ void udr_app::handle_query_sdm_subscription(const std::string &ue_id,
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
MYSQL_FIELD
*
field
=
nullptr
;
nlohmann
::
json
j
=
{};
SdmSubscription
SdmSubscriptions
;
SdmSubscription
SdmSubscriptions
=
{};
const
std
::
string
query
=
"SELECT * from SdmSubscriptions WHERE ueid='"
+
ue_id
+
"' AND subsId="
+
subs_id
;
...
...
@@ -1186,7 +1166,7 @@ void udr_app::handle_update_sdm_subscription(const std::string &ue_id,
"' AND subsId="
+
subs_id
;
std
::
string
query
=
{};
nlohmann
::
json
j
=
{};
ProblemDetails
problemdetails
;
ProblemDetails
problemdetails
=
{}
;
if
(
mysql_real_query
(
&
mysql
,
select_query
.
c_str
(),
(
unsigned
long
)
select_query
.
size
()))
{
...
...
@@ -1288,7 +1268,6 @@ void udr_app::handle_create_sdm_subscriptions(const std::string &ue_id,
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
nlohmann
::
json
j
=
{};
int32_t
subs_id
=
0
;
int32_t
count
=
0
;
std
::
string
query
=
...
...
@@ -1418,7 +1397,7 @@ void udr_app::handle_query_sdm_subscriptions(const std::string &ue_id,
j
.
clear
();
while
(
row
=
mysql_fetch_row
(
res
))
{
SdmSubscription
sdmsubscriptions
;
SdmSubscription
sdmsubscriptions
=
{}
;
tmp
.
clear
();
...
...
@@ -1497,10 +1476,8 @@ void udr_app::handle_query_sm_data(const std::string &ue_id,
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
MYSQL_FIELD
*
field
=
nullptr
;
nlohmann
::
json
j
=
{};
SessionManagementSubscriptionData
sessionmanagementsubscriptiondata
;
SessionManagementSubscriptionData
sessionmanagementsubscriptiondata
=
{};
const
std
::
string
query
=
"select * from SessionManagementSubscriptionData WHERE ueid='"
+
ue_id
+
"' and servingPlmnid='"
+
serving_plmn_id
+
"'"
;
...
...
@@ -1764,10 +1741,8 @@ void udr_app::handle_query_smf_registration(const std::string &ue_id,
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
MYSQL_FIELD
*
field
=
nullptr
;
nlohmann
::
json
j
=
{};
SmfRegistration
smfregistration
;
SmfRegistration
smfregistration
=
{};
const
std
::
string
query
=
"SELECT * from SmfRegistrations WHERE ueid='"
+
ue_id
+
"' AND subpduSessionId="
+
std
::
to_string
(
pdu_session_id
);
...
...
@@ -1865,9 +1840,7 @@ void udr_app::handle_query_smf_reg_list(const std::string &ue_id,
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
MYSQL_FIELD
*
field
=
nullptr
;
std
::
vector
<
std
::
string
>
fields
;
nlohmann
::
json
j
=
{};
nlohmann
::
json
tmp
=
{};
...
...
@@ -1978,10 +1951,8 @@ void udr_app::handle_query_smf_select_data(const std::string &ue_id,
MYSQL_RES
*
res
=
NULL
;
MYSQL_ROW
row
=
{};
MYSQL_FIELD
*
field
=
nullptr
;
nlohmann
::
json
j
=
{};
SmfSelectionSubscriptionData
smfselectionsubscriptiondata
;
SmfSelectionSubscriptionData
smfselectionsubscriptiondata
=
{};
const
std
::
string
query
=
"select * from SmfSelectionSubscriptionData WHERE ueid='"
+
ue_id
+
"' and servingPlmnid='"
+
serving_plmn_id
+
"'"
;
...
...
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