Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
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
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
littleBu
OpenXG-RAN
Commits
161ef339
Commit
161ef339
authored
2 years ago
by
Sakthivel Velumani
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free ASN1 decoder memory for BCCH
parent
1576f353
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
35 deletions
+33
-35
openair2/RRC/NR_UE/rrc_UE.c
openair2/RRC/NR_UE/rrc_UE.c
+33
-35
No files found.
openair2/RRC/NR_UE/rrc_UE.c
View file @
161ef339
...
@@ -559,9 +559,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
...
@@ -559,9 +559,7 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
NR_BCCH_BCH_Message_t
*
bcch_message
=
NULL
;
NR_BCCH_BCH_Message_t
*
bcch_message
=
NULL
;
if
(
NR_UE_rrc_inst
[
module_id
].
mib
!=
NULL
)
if
(
NR_UE_rrc_inst
[
module_id
].
mib
==
NULL
)
SEQUENCE_free
(
&
asn_DEF_NR_BCCH_BCH_Message
,
(
void
*
)
bcch_message
,
1
);
else
LOG_A
(
NR_RRC
,
"Configuring MAC for first MIB reception
\n
"
);
LOG_A
(
NR_RRC
,
"Configuring MAC for first MIB reception
\n
"
);
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
asn_dec_rval_t
dec_rval
=
uper_decode_complete
(
NULL
,
...
@@ -570,24 +568,23 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
...
@@ -570,24 +568,23 @@ int8_t nr_rrc_ue_decode_NR_BCCH_BCH_Message(
(
const
void
*
)
bufferP
,
(
const
void
*
)
bufferP
,
buffer_len
);
buffer_len
);
int
ret
;
if
((
dec_rval
.
code
!=
RC_OK
)
||
(
dec_rval
.
consumed
==
0
))
{
if
((
dec_rval
.
code
!=
RC_OK
)
||
(
dec_rval
.
consumed
==
0
))
{
LOG_E
(
NR_RRC
,
"NR_BCCH_BCH decode error
\n
"
);
LOG_E
(
NR_RRC
,
"NR_BCCH_BCH decode error
\n
"
);
// free the memory
ret
=
-
1
;
SEQUENCE_free
(
&
asn_DEF_NR_BCCH_BCH_Message
,
(
void
*
)
bcch_message
,
1
);
return
-
1
;
}
}
else
{
else
{
// link to rrc instance
// link to rrc instance
SEQUENCE_free
(
&
asn_DEF_NR_MIB
,
(
void
*
)
NR_UE_rrc_inst
[
module_id
].
mib
,
1
);
ASN_STRUCT_FREE
(
asn_DEF_NR_MIB
,
NR_UE_rrc_inst
[
module_id
].
mib
);
NR_UE_rrc_inst
[
module_id
].
mib
=
bcch_message
->
message
.
choice
.
mib
;
NR_UE_rrc_inst
[
module_id
].
mib
=
bcch_message
->
message
.
choice
.
mib
;
//memcpy( (void *)mib,
bcch_message
->
message
.
choice
.
mib
=
NULL
;
// (void *)&bcch_message->message.choice.mib,
// sizeof(NR_MIB_t) );
nr_rrc_mac_config_req_ue
(
0
,
0
,
0
,
NR_UE_rrc_inst
[
module_id
].
mib
,
NULL
,
NULL
,
NULL
);
nr_rrc_mac_config_req_ue
(
0
,
0
,
0
,
NR_UE_rrc_inst
[
module_id
].
mib
,
NULL
,
NULL
,
NULL
);
ret
=
0
;
}
}
ASN_STRUCT_FREE
(
asn_DEF_NR_BCCH_BCH_Message
,
bcch_message
);
return
0
;
return
ret
;
}
}
const
char
*
nr_SIBreserved
(
long
value
)
{
const
char
*
nr_SIBreserved
(
long
value
)
{
...
@@ -2245,6 +2242,7 @@ nr_rrc_ue_establish_srb2(
...
@@ -2245,6 +2242,7 @@ nr_rrc_ue_establish_srb2(
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
if
((
dec_rval
.
code
!=
RC_OK
)
&&
(
dec_rval
.
consumed
==
0
))
{
LOG_E
(
NR_RRC
,
"Failed to decode DL-DCCH (%zu bytes)
\n
"
,
dec_rval
.
consumed
);
LOG_E
(
NR_RRC
,
"Failed to decode DL-DCCH (%zu bytes)
\n
"
,
dec_rval
.
consumed
);
ASN_STRUCT_FREE
(
asn_DEF_NR_DL_DCCH_Message
,
dl_dcch_msg
);
return
-
1
;
return
-
1
;
}
}
...
...
This diff is collapsed.
Click to expand it.
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