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
bdf89837
Commit
bdf89837
authored
Aug 18, 2021
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Temporary fix for UserLocationInformation Criticality
parent
6ac06161
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
20 deletions
+36
-20
src/ngap/ngapMsgs/HandoverNotifyMsg.cpp
src/ngap/ngapMsgs/HandoverNotifyMsg.cpp
+36
-20
No files found.
src/ngap/ngapMsgs/HandoverNotifyMsg.cpp
View file @
bdf89837
...
@@ -53,7 +53,13 @@ HandoverNotifyMsg::HandoverNotifyMsg() {
...
@@ -53,7 +53,13 @@ HandoverNotifyMsg::HandoverNotifyMsg() {
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
HandoverNotifyMsg
::~
HandoverNotifyMsg
(){};
HandoverNotifyMsg
::~
HandoverNotifyMsg
()
{
if
(
amfUeNgapId
)
free
(
amfUeNgapId
);
if
(
ranUeNgapId
)
free
(
ranUeNgapId
);
if
(
userLocationInformation
)
free
(
userLocationInformation
);
if
(
handoverNotifyPdu
)
free
(
handoverNotifyPdu
);
if
(
handoverNotifyIEs
)
free
(
handoverNotifyIEs
);
};
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
unsigned
long
HandoverNotifyMsg
::
getAmfUeNgapId
()
{
unsigned
long
HandoverNotifyMsg
::
getAmfUeNgapId
()
{
...
@@ -106,11 +112,11 @@ bool HandoverNotifyMsg::decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu) {
...
@@ -106,11 +112,11 @@ bool HandoverNotifyMsg::decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu) {
if
(
!
amfUeNgapId
->
decodefromAMF_UE_NGAP_ID
(
if
(
!
amfUeNgapId
->
decodefromAMF_UE_NGAP_ID
(
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
AMF_UE_NGAP_ID
))
{
->
value
.
choice
.
AMF_UE_NGAP_ID
))
{
Logger
::
ngap
().
error
(
"Decoded
ngap
AMF_UE_NGAP_ID IE error"
);
Logger
::
ngap
().
error
(
"Decoded
NGAP
AMF_UE_NGAP_ID IE error"
);
return
false
;
return
false
;
}
}
}
else
{
}
else
{
Logger
::
ngap
().
error
(
"Decoded
ngap
AMF_UE_NGAP_ID IE error"
);
Logger
::
ngap
().
error
(
"Decoded
NGAP
AMF_UE_NGAP_ID IE error"
);
return
false
;
return
false
;
}
}
}
break
;
}
break
;
...
@@ -123,29 +129,33 @@ bool HandoverNotifyMsg::decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu) {
...
@@ -123,29 +129,33 @@ bool HandoverNotifyMsg::decodefrompdu(Ngap_NGAP_PDU_t* ngap_msg_pdu) {
if
(
!
ranUeNgapId
->
decodefromRAN_UE_NGAP_ID
(
if
(
!
ranUeNgapId
->
decodefromRAN_UE_NGAP_ID
(
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
RAN_UE_NGAP_ID
))
{
->
value
.
choice
.
RAN_UE_NGAP_ID
))
{
Logger
::
ngap
().
error
(
"Decoded
ngap
RAN_UE_NGAP_ID IE error"
);
Logger
::
ngap
().
error
(
"Decoded
NGAP
RAN_UE_NGAP_ID IE error"
);
return
false
;
return
false
;
}
}
}
else
{
}
else
{
Logger
::
ngap
().
error
(
"Decoded
ngap
RAN_UE_NGAP_ID IE error"
);
Logger
::
ngap
().
error
(
"Decoded
NGAP
RAN_UE_NGAP_ID IE error"
);
return
false
;
return
false
;
}
}
}
break
;
}
break
;
case
Ngap_ProtocolIE_ID_id_UserLocationInformation
:
{
case
Ngap_ProtocolIE_ID_id_UserLocationInformation
:
{
if
(
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
->
criticality
==
// TODO: Temporarily disable Criticality check to be tested with dsTest
Ngap_Criticality_ignore
&&
/*if (handoverNotifyIEs->protocolIEs.list.array[i]->criticality ==
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
present
==
Ngap_Criticality_ignore &&
Ngap_HandoverNotifyIEs__value_PR_UserLocationInformation
)
{
handoverNotifyIEs->protocolIEs.list.array[i]->value.present ==
Ngap_HandoverNotifyIEs__value_PR_UserLocationInformation) {
*/
if
(
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
present
==
Ngap_HandoverNotifyIEs__value_PR_UserLocationInformation
)
{
userLocationInformation
=
new
UserLocationInformation
();
userLocationInformation
=
new
UserLocationInformation
();
if
(
!
userLocationInformation
->
decodefromUserLocationInformation
(
if
(
!
userLocationInformation
->
decodefromUserLocationInformation
(
&
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
&
handoverNotifyIEs
->
protocolIEs
.
list
.
array
[
i
]
->
value
.
choice
.
UserLocationInformation
))
{
->
value
.
choice
.
UserLocationInformation
))
{
Logger
::
ngap
().
error
(
Logger
::
ngap
().
error
(
"Decoded
ngap
UserLocationInformation IE error"
);
"Decoded
NGAP
UserLocationInformation IE error"
);
return
false
;
return
false
;
}
}
}
else
{
}
else
{
Logger
::
ngap
().
error
(
"Decoded
ngap
UserLocationInformation IE error"
);
Logger
::
ngap
().
error
(
"Decoded
NGAP
UserLocationInformation IE error"
);
return
false
;
return
false
;
}
}
}
break
;
}
break
;
...
@@ -164,8 +174,6 @@ void HandoverNotifyMsg::setUserLocationInfoNR(
...
@@ -164,8 +174,6 @@ void HandoverNotifyMsg::setUserLocationInfoNR(
if
(
!
userLocationInformation
)
if
(
!
userLocationInformation
)
userLocationInformation
=
new
UserLocationInformation
();
userLocationInformation
=
new
UserLocationInformation
();
// userLocationInformation->setInformation(UserLocationInformationEUTRA *
// informationEUTRA);
UserLocationInformationNR
*
informationNR
=
new
UserLocationInformationNR
();
UserLocationInformationNR
*
informationNR
=
new
UserLocationInformationNR
();
NR_CGI
*
nR_CGI
=
new
NR_CGI
();
NR_CGI
*
nR_CGI
=
new
NR_CGI
();
PlmnId
*
plmnId_cgi
=
new
PlmnId
();
PlmnId
*
plmnId_cgi
=
new
PlmnId
();
...
@@ -216,24 +224,32 @@ bool HandoverNotifyMsg::getUserLocationInfoNR(
...
@@ -216,24 +224,32 @@ bool HandoverNotifyMsg::getUserLocationInfoNR(
struct
NrCgi_s
&
cig
,
struct
Tai_s
&
tai
)
{
struct
NrCgi_s
&
cig
,
struct
Tai_s
&
tai
)
{
if
(
!
userLocationInformation
)
return
false
;
if
(
!
userLocationInformation
)
return
false
;
UserLocationInformationNR
*
informationNR
;
UserLocationInformationNR
*
informationNR
=
nullptr
;
userLocationInformation
->
getInformation
(
informationNR
);
userLocationInformation
->
getInformation
(
informationNR
);
if
(
!
informationNR
)
return
false
;
if
(
userLocationInformation
->
getChoiceOfUserLocationInformation
()
!=
if
(
userLocationInformation
->
getChoiceOfUserLocationInformation
()
!=
Ngap_UserLocationInformation_PR_userLocationInformationNR
)
Ngap_UserLocationInformation_PR_userLocationInformationNR
)
return
false
;
return
false
;
NR_CGI
*
nR_CGI
;
TAI
*
nR_TAI
;
NR_CGI
*
nR_CGI
=
nullptr
;
TAI
*
nR_TAI
=
nullptr
;
informationNR
->
getInformationNR
(
nR_CGI
,
nR_TAI
);
informationNR
->
getInformationNR
(
nR_CGI
,
nR_TAI
);
PlmnId
*
cgi_plmnId
;
if
(
!
nR_CGI
or
!
nR_TAI
)
return
false
;
NRCellIdentity
*
nRCellIdentity
;
PlmnId
*
cgi_plmnId
=
nullptr
;
NRCellIdentity
*
nRCellIdentity
=
nullptr
;
nR_CGI
->
getNR_CGI
(
cgi_plmnId
,
nRCellIdentity
);
nR_CGI
->
getNR_CGI
(
cgi_plmnId
,
nRCellIdentity
);
if
(
!
cgi_plmnId
or
!
nRCellIdentity
)
return
false
;
cgi_plmnId
->
getMcc
(
cig
.
mcc
);
cgi_plmnId
->
getMcc
(
cig
.
mcc
);
cgi_plmnId
->
getMnc
(
cig
.
mnc
);
cgi_plmnId
->
getMnc
(
cig
.
mnc
);
cig
.
nrCellID
=
nRCellIdentity
->
getNRCellIdentity
();
cig
.
nrCellID
=
nRCellIdentity
->
getNRCellIdentity
();
PlmnId
*
tai_plmnId
;
PlmnId
*
tai_plmnId
=
nullptr
;
TAC
*
tac
;
TAC
*
tac
=
nullptr
;
nR_TAI
->
getTAI
(
tai_plmnId
,
tac
);
nR_TAI
->
getTAI
(
tai_plmnId
,
tac
);
if
(
!
tai_plmnId
or
!
tac
)
return
false
;
tai_plmnId
->
getMcc
(
tai
.
mcc
);
tai_plmnId
->
getMcc
(
tai
.
mcc
);
tai_plmnId
->
getMnc
(
tai
.
mnc
);
tai_plmnId
->
getMnc
(
tai
.
mnc
);
tai
.
tac
=
tac
->
getTac
();
tai
.
tac
=
tac
->
getTac
();
...
...
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