Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG UE
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
Michael Black
OpenXG UE
Commits
110831e6
Commit
110831e6
authored
Oct 10, 2016
by
Nikos Makris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory management issues
parent
600e030d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
39 deletions
+33
-39
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
+3
-12
openair2/LAYER2/PROTO_AGENT/proto_agent.c
openair2/LAYER2/PROTO_AGENT/proto_agent.c
+6
-8
openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
+24
-19
No files found.
openair2/LAYER2/PDCP_v10.1.0/pdcp.c
View file @
110831e6
...
...
@@ -396,6 +396,9 @@ boolean_t pdcp_data_req(
proto_agent_send_rlc_data_req
(
ctxt_pP
,
srb_flagP
,
MBMS_FLAG_NO
,
rb_idP
,
muiP
,
confirmP
,
pdcp_pdu_size
,
pdcp_pdu_p
);
//rlc_status = ack_result;
// free the memory for this block
free_mem_block
(
pdcp_pdu_p
);
printf
(
"Response is %u
\n
"
,
ack_result_nikos
);
rlc_status
=
ack_result_nikos
;
}
...
...
@@ -454,18 +457,6 @@ boolean_t pdcp_data_req(
}
}*/
//starting async
// const Enb_properties_array_t *enb_properties_p = NULL;
// Enb_properties_array_t *enb_properties_p = NULL;
// enb_properties_p = malloc(sizeof(Enb_properties_array_t));
// memset(enb_properties_p, 0, sizeof(Enb_properties_array_t));
// printf("starting the client\n\n");
// printf("Starting the async client\\n");
// new_thread(proto_server_start, NULL);
// enb_properties_p = enb_config_get();
// proto_agent_start(ctxt_pP->module_id, enb_properties_p);
VCD_SIGNAL_DUMPER_DUMP_FUNCTION_BY_NAME
(
VCD_SIGNAL_DUMPER_FUNCTIONS_PDCP_DATA_REQ
,
VCD_FUNCTION_OUT
);
...
...
openair2/LAYER2/PROTO_AGENT/proto_agent.c
View file @
110831e6
...
...
@@ -86,7 +86,7 @@ void *receive_thread(void *args) {
LOG_E
(
PROTO_AGENT
,
"msg to send back is NULL
\n
"
);
}
free
(
data
);
//
free(data);
if
(
msg
!=
NULL
){
if
(
proto_agent_msg_send
(
d
->
enb_id
,
PROTO_AGENT_DEFAULT
,
msg
,
size
,
priority
))
{
...
...
@@ -373,11 +373,9 @@ proto_agent_send_rlc_data_req(const protocol_ctxt_t* const ctxt_pP, const srb_fl
int
msgsize
=
0
;
if
(
init_msg
!=
NULL
)
{
printf
(
"Will pack the message
\n
"
);
msg
=
proto_agent_pack_message
(
init_msg
,
&
msgsize
);
printf
(
"Will free the message
\n
"
);
free
(
init_msg
);
LOG_I
(
PROTO_AGENT
,
"Server sending the pdcp data_req message over the async channel
\n
"
);
...
...
@@ -441,7 +439,7 @@ proto_agent_send_pdcp_data_ind(const protocol_ctxt_t* const ctxt_pP, const srb_f
printf
(
"Will pack the message
\n
"
);
msg
=
proto_agent_pack_message
(
init_msg
,
&
msgsize
);
printf
(
"packed the message
\n
"
);
free
(
init_msg
);
//
free(init_msg);
if
(
msg
!=
NULL
)
{
...
...
@@ -496,7 +494,7 @@ proto_server_receive(void)
}
else
{
free
(
data
);
//
free(data);
ser_msg
=
proto_agent_pack_message
(
msg
,
&
size
);
}
...
...
@@ -554,7 +552,7 @@ proto_client_receive(void)
}
else
{
free
(
data
);
//
free(data);
ser_msg
=
proto_agent_pack_message
(
msg
,
&
size
);
}
...
...
openair2/LAYER2/PROTO_AGENT/proto_agent_common.c
View file @
110831e6
...
...
@@ -242,13 +242,13 @@ int proto_agent_destroy_pdcp_data_req(Protocol__FlexsplitMessage *msg) {
if
(
msg
->
msg_case
!=
PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_REQ_MSG
)
goto
error
;
//
free(msg->data_req_msg->header);
//
free(msg->data_req_msg->pdcp_data->fsp_pdu->fsp_pdu_data.data);
//
free(msg->data_req_msg->pdcp_data->fsp_pdu);
//
free(msg->data_req_msg->pdcp_data->fsp_ctxt);
//
free(msg->data_req_msg->pdcp_data);
//
free(msg->data_req_msg);
//
free(msg);
free
(
msg
->
data_req_msg
->
header
);
free
(
msg
->
data_req_msg
->
pdcp_data
->
fsp_pdu
->
fsp_pdu_data
.
data
);
free
(
msg
->
data_req_msg
->
pdcp_data
->
fsp_pdu
);
free
(
msg
->
data_req_msg
->
pdcp_data
->
fsp_ctxt
);
free
(
msg
->
data_req_msg
->
pdcp_data
);
free
(
msg
->
data_req_msg
);
free
(
msg
);
return
0
;
error:
...
...
@@ -355,6 +355,8 @@ int proto_agent_pdcp_data_req_ack(mid_t mod_id, const void *params, Protocol__Fl
return
0
;
error:
if
(
pdcp_pdu_p
!=
NULL
)
free_mem_block
(
pdcp_pdu_p
);
if
(
header
!=
NULL
)
free
(
header
);
if
(
ack
!=
NULL
)
...
...
@@ -370,9 +372,9 @@ int proto_agent_destroy_pdcp_data_req_ack(Protocol__FlexsplitMessage *msg) {
if
(
msg
->
msg_case
!=
PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_REQ_ACK
)
goto
error
;
//
free(msg->data_req_ack->header);
//
free(msg->data_req_ack);
//
free(msg);
free
(
msg
->
data_req_ack
->
header
);
free
(
msg
->
data_req_ack
);
free
(
msg
);
return
0
;
error:
...
...
@@ -385,9 +387,9 @@ int proto_agent_destroy_pdcp_data_ind(Protocol__FlexsplitMessage *msg) {
if
(
msg
->
msg_case
!=
PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_MSG
)
goto
error
;
//
free(msg->data_req_ack->header);
//
free(msg->data_req_ack);
//
free(msg);
free
(
msg
->
data_req_ack
->
header
);
free
(
msg
->
data_req_ack
);
free
(
msg
);
return
0
;
error:
...
...
@@ -591,6 +593,9 @@ int proto_agent_pdcp_data_ind_ack(mid_t mod_id, const void *params, Protocol__Fl
free
(
ack
);
if
(
*
msg
!=
NULL
)
free
(
*
msg
);
if
(
pdcp_pdu_p
!=
NULL
)
free_mem_block
(
pdcp_pdu_p
);
LOG_E
(
MAC
,
"%s: an error occured
\n
"
,
__FUNCTION__
);
return
-
1
;
...
...
@@ -601,9 +606,9 @@ int proto_agent_destroy_pdcp_data_ind_ack(Protocol__FlexsplitMessage *msg) {
if
(
msg
->
msg_case
!=
PROTOCOL__FLEXSPLIT_MESSAGE__MSG_DATA_IND_ACK
)
goto
error
;
//
free(msg->data_req_ack->header);
//
free(msg->data_req_ack);
//
free(msg);
free
(
msg
->
data_req_ack
->
header
);
free
(
msg
->
data_req_ack
);
free
(
msg
);
return
0
;
error:
...
...
@@ -764,9 +769,9 @@ int proto_agent_destroy_echo_reply(Protocol__FlexsplitMessage *msg) {
if
(
msg
->
msg_case
!=
PROTOCOL__FLEXSPLIT_MESSAGE__MSG_ECHO_REPLY_MSG
)
goto
error
;
//
free(msg->echo_reply_msg->header);
//
free(msg->echo_reply_msg);
//
free(msg);
free
(
msg
->
echo_reply_msg
->
header
);
free
(
msg
->
echo_reply_msg
);
free
(
msg
);
return
0
;
error:
...
...
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