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
0a7254ba
Commit
0a7254ba
authored
Mar 09, 2022
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix CppCheck
parent
126c8d46
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
34 additions
and
9 deletions
+34
-9
src/amf-app/amf_n1.cpp
src/amf-app/amf_n1.cpp
+1
-0
src/common/conversions.cpp
src/common/conversions.cpp
+1
-0
src/contexts/nas_context.cpp
src/contexts/nas_context.cpp
+1
-0
src/nas/ies/Payload_Container.cpp
src/nas/ies/Payload_Container.cpp
+2
-0
src/nas/ies/UESecurityCapability.cpp
src/nas/ies/UESecurityCapability.cpp
+2
-0
src/ngap/ngapIEs/AssociatedQosFlowList.cpp
src/ngap/ngapIEs/AssociatedQosFlowList.cpp
+13
-4
src/ngap/ngapIEs/PDUSessionResourceModifyItemModReq.cpp
src/ngap/ngapIEs/PDUSessionResourceModifyItemModReq.cpp
+1
-0
src/ngap/ngapIEs/PDUSessionResourceSetupItemCxtReq.cpp
src/ngap/ngapIEs/PDUSessionResourceSetupItemCxtReq.cpp
+5
-1
src/ngap/ngapIEs/ResetType.cpp
src/ngap/ngapIEs/ResetType.cpp
+4
-0
src/ngap/ngapIEs/UEAssociationLogicalNGConnectionItem.cpp
src/ngap/ngapIEs/UEAssociationLogicalNGConnectionItem.cpp
+4
-4
No files found.
src/amf-app/amf_n1.cpp
View file @
0a7254ba
...
@@ -2161,6 +2161,7 @@ bool amf_n1::start_security_mode_control_procedure(
...
@@ -2161,6 +2161,7 @@ bool amf_n1::start_security_mode_control_procedure(
}
}
if
(
!
secu_ctx
)
{
if
(
!
secu_ctx
)
{
Logger
::
amf_n1
().
error
(
"No Security Context found"
);
Logger
::
amf_n1
().
error
(
"No Security Context found"
);
free_wrapper
((
void
**
)
&
data
);
return
false
;
return
false
;
}
}
...
...
src/common/conversions.cpp
View file @
0a7254ba
...
@@ -172,6 +172,7 @@ void conv::convert_string_2_hex(
...
@@ -172,6 +172,7 @@ void conv::convert_string_2_hex(
sprintf
(
datahex
+
i
*
2
,
"%02x"
,
data
[
i
]);
sprintf
(
datahex
+
i
*
2
,
"%02x"
,
data
[
i
]);
output_str
=
reinterpret_cast
<
char
*>
(
datahex
);
output_str
=
reinterpret_cast
<
char
*>
(
datahex
);
free_wrapper
((
void
**
)
&
datahex
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
...
src/contexts/nas_context.cpp
View file @
0a7254ba
...
@@ -64,6 +64,7 @@ nas_context::nas_context() : _vector(), _5g_he_av(), _5g_av(), kamf() {
...
@@ -64,6 +64,7 @@ nas_context::nas_context() : _vector(), _5g_he_av(), _5g_av(), kamf() {
is_auth_vectors_present
=
false
;
is_auth_vectors_present
=
false
;
to_be_register_by_new_suci
=
false
;
to_be_register_by_new_suci
=
false
;
ueSecurityCaplen
=
0
;
ueSecurityCaplen
=
0
;
registration_request_is_set
=
false
;
nas_status
=
CM_IDLE
;
nas_status
=
CM_IDLE
;
is_mobile_reachable_timer_timeout
=
false
;
is_mobile_reachable_timer_timeout
=
false
;
mobile_reachable_timer
=
ITTI_INVALID_TIMER_ID
;
mobile_reachable_timer
=
ITTI_INVALID_TIMER_ID
;
...
...
src/nas/ies/Payload_Container.cpp
View file @
0a7254ba
...
@@ -43,6 +43,7 @@ Payload_Container::Payload_Container(uint8_t iei, bstring b) {
...
@@ -43,6 +43,7 @@ Payload_Container::Payload_Container(uint8_t iei, bstring b) {
_iei
=
iei
;
_iei
=
iei
;
content
=
b
;
content
=
b
;
CONTENT
=
{};
CONTENT
=
{};
length
=
1
+
blength
(
b
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -66,6 +67,7 @@ Payload_Container::Payload_Container(
...
@@ -66,6 +67,7 @@ Payload_Container::Payload_Container(
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
Payload_Container
::
Payload_Container
()
:
content
()
{
Payload_Container
::
Payload_Container
()
:
content
()
{
_iei
=
0
;
_iei
=
0
;
length
=
0
;
CONTENT
=
{};
CONTENT
=
{};
}
}
...
...
src/nas/ies/UESecurityCapability.cpp
View file @
0a7254ba
...
@@ -60,6 +60,8 @@ UESecurityCapability::UESecurityCapability(
...
@@ -60,6 +60,8 @@ UESecurityCapability::UESecurityCapability(
_iei
=
iei
;
_iei
=
iei
;
_5g_EASel
=
_5gg_EASel
;
_5g_EASel
=
_5gg_EASel
;
_5g_IASel
=
_5gg_IASel
;
_5g_IASel
=
_5gg_IASel
;
EEASel
=
0
;
EIASel
=
0
;
length
=
2
;
length
=
2
;
}
}
...
...
src/ngap/ngapIEs/AssociatedQosFlowList.cpp
View file @
0a7254ba
...
@@ -27,6 +27,7 @@
...
@@ -27,6 +27,7 @@
*/
*/
#include "AssociatedQosFlowList.hpp"
#include "AssociatedQosFlowList.hpp"
#include "dynamic_memory_check.h"
#include <iostream>
#include <iostream>
using
namespace
std
;
using
namespace
std
;
...
@@ -65,12 +66,20 @@ bool AssociatedQosFlowList::encode2AssociatedQosFlowList(
...
@@ -65,12 +66,20 @@ bool AssociatedQosFlowList::encode2AssociatedQosFlowList(
Ngap_AssociatedQosFlowItem_t
*
ie
=
(
Ngap_AssociatedQosFlowItem_t
*
)
calloc
(
Ngap_AssociatedQosFlowItem_t
*
ie
=
(
Ngap_AssociatedQosFlowItem_t
*
)
calloc
(
1
,
sizeof
(
Ngap_AssociatedQosFlowItem_t
));
1
,
sizeof
(
Ngap_AssociatedQosFlowItem_t
));
if
(
!
ie
)
return
false
;
if
(
!
ie
)
return
false
;
if
(
!
associatedQosFlowItem
)
return
false
;
if
(
!
associatedQosFlowItem
)
{
if
(
!
associatedQosFlowItem
[
i
].
encode2AssociatedQosFlowItem
(
ie
))
free_wrapper
((
void
**
)
&
ie
);
return
false
;
return
false
;
if
(
ASN_SEQUENCE_ADD
(
&
associatedQosFlowList
.
list
,
ie
)
!=
0
)
return
false
;
}
if
(
!
associatedQosFlowItem
[
i
].
encode2AssociatedQosFlowItem
(
ie
))
{
free_wrapper
((
void
**
)
&
ie
);
return
false
;
}
if
(
ASN_SEQUENCE_ADD
(
&
associatedQosFlowList
.
list
,
ie
)
!=
0
)
{
free_wrapper
((
void
**
)
&
ie
);
return
false
;
}
free_wrapper
((
void
**
)
&
ie
);
}
}
return
true
;
return
true
;
}
}
...
...
src/ngap/ngapIEs/PDUSessionResourceModifyItemModReq.cpp
View file @
0a7254ba
...
@@ -36,6 +36,7 @@ namespace ngap {
...
@@ -36,6 +36,7 @@ namespace ngap {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
PDUSessionResourceModifyItemModReq
::
PDUSessionResourceModifyItemModReq
()
{
PDUSessionResourceModifyItemModReq
::
PDUSessionResourceModifyItemModReq
()
{
nAS_PDU
=
nullptr
;
nAS_PDU
=
nullptr
;
s_NSSAI
=
nullptr
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
...
src/ngap/ngapIEs/PDUSessionResourceSetupItemCxtReq.cpp
View file @
0a7254ba
...
@@ -27,6 +27,10 @@
...
@@ -27,6 +27,10 @@
*/
*/
#include "PDUSessionResourceSetupItemCxtReq.hpp"
#include "PDUSessionResourceSetupItemCxtReq.hpp"
//#include "dynamic_memory_check.h"
extern
"C"
{
#include "dynamic_memory_check.h"
}
#include <iostream>
#include <iostream>
using
namespace
std
;
using
namespace
std
;
...
@@ -70,7 +74,7 @@ bool PDUSessionResourceSetupItemCxtReq::
...
@@ -70,7 +74,7 @@ bool PDUSessionResourceSetupItemCxtReq::
(
Ngap_NAS_PDU_t
*
)
calloc
(
1
,
sizeof
(
Ngap_NAS_PDU_t
));
(
Ngap_NAS_PDU_t
*
)
calloc
(
1
,
sizeof
(
Ngap_NAS_PDU_t
));
if
(
!
naspdu
)
return
false
;
if
(
!
naspdu
)
return
false
;
if
(
!
nAS_PDU
->
encode2octetstring
(
*
naspdu
))
{
if
(
!
nAS_PDU
->
encode2octetstring
(
*
naspdu
))
{
if
(
naspdu
!=
nullptr
)
free
(
naspdu
);
free_wrapper
((
void
**
)
&
naspdu
);
return
false
;
return
false
;
}
}
pduSessionResourceSetupItemCxtReq
->
nAS_PDU
=
naspdu
;
pduSessionResourceSetupItemCxtReq
->
nAS_PDU
=
naspdu
;
...
...
src/ngap/ngapIEs/ResetType.cpp
View file @
0a7254ba
...
@@ -27,6 +27,9 @@
...
@@ -27,6 +27,9 @@
*/
*/
#include "ResetType.hpp"
#include "ResetType.hpp"
extern
"C"
{
#include "dynamic_memory_check.h"
}
#include <iostream>
#include <iostream>
using
namespace
std
;
using
namespace
std
;
...
@@ -58,6 +61,7 @@ void ResetType::setResetType(
...
@@ -58,6 +61,7 @@ void ResetType::setResetType(
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++
)
{
item
[
i
].
encode
(
list
[
i
]);
item
[
i
].
encode
(
list
[
i
]);
}
}
free_wrapper
((
void
**
)
&
item
);
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
bool
ResetType
::
encode
(
Ngap_ResetType_t
*
type
)
{
bool
ResetType
::
encode
(
Ngap_ResetType_t
*
type
)
{
...
...
src/ngap/ngapIEs/UEAssociationLogicalNGConnectionItem.cpp
View file @
0a7254ba
...
@@ -56,9 +56,9 @@ void UEAssociationLogicalNGConnectionItem::setAmfUeNgapId(unsigned long id) {
...
@@ -56,9 +56,9 @@ void UEAssociationLogicalNGConnectionItem::setAmfUeNgapId(unsigned long id) {
int
ret
=
amfUeNgapId
->
encode2AMF_UE_NGAP_ID
(
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
);
int
ret
=
amfUeNgapId
->
encode2AMF_UE_NGAP_ID
(
ie
->
value
.
choice
.
AMF_UE_NGAP_ID
);
if
(
!
ret
)
{
if
(
!
ret
)
{
cout
<<
"encode AMF_UE_NGAP_ID IE error"
<<
endl
;
cout
<<
"encode AMF_UE_NGAP_ID IE error"
<<
endl
;
free_wrapper
((
void
**
)
&
ie
);
return
;
}
}
free_wrapper
((
void
**
)
&
ie
);
return
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
@@ -77,9 +77,9 @@ void UEAssociationLogicalNGConnectionItem::setRanUeNgapId(
...
@@ -77,9 +77,9 @@ void UEAssociationLogicalNGConnectionItem::setRanUeNgapId(
int
ret
=
ranUeNgapId
->
encode2RAN_UE_NGAP_ID
(
ie
->
value
.
choice
.
RAN_UE_NGAP_ID
);
int
ret
=
ranUeNgapId
->
encode2RAN_UE_NGAP_ID
(
ie
->
value
.
choice
.
RAN_UE_NGAP_ID
);
if
(
!
ret
)
{
if
(
!
ret
)
{
cout
<<
"Encode RAN_UE_NGAP_ID IE error"
<<
endl
;
cout
<<
"Encode RAN_UE_NGAP_ID IE error"
<<
endl
;
free_wrapper
((
void
**
)
&
ie
);
return
;
}
}
free_wrapper
((
void
**
)
&
ie
);
return
;
}
}
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
...
...
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