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
常顺宇
OpenXG-RAN
Commits
b9cf840a
Commit
b9cf840a
authored
9 years ago
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created callback mechanism for destruction of protocol messages sent by the agent
parent
0bea0aaf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
2 deletions
+15
-2
openair2/ENB_APP/enb_agent_common.c
openair2/ENB_APP/enb_agent_common.c
+1
-1
openair2/ENB_APP/enb_agent_common.h
openair2/ENB_APP/enb_agent_common.h
+4
-0
openair2/ENB_APP/enb_agent_handler.c
openair2/ENB_APP/enb_agent_handler.c
+10
-1
No files found.
openair2/ENB_APP/enb_agent_common.c
View file @
b9cf840a
...
...
@@ -134,7 +134,7 @@ int enb_agent_hello(uint32_t xid, const void *params, Protocol__ProgranMessage *
}
int
enb_agent_destroy_hello
_message
(
Protocol__ProgranMessage
*
msg
)
{
int
enb_agent_destroy_hello
(
Protocol__ProgranMessage
*
msg
)
{
if
(
msg
->
msg_case
!=
PROTOCOL__PROGRAN_MESSAGE__MSG_HELLO_MSG
)
goto
error
;
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_common.h
View file @
b9cf840a
...
...
@@ -53,6 +53,10 @@ typedef int (*enb_agent_message_decoded_callback)(
Protocol__ProgranMessage
**
msg
);
typedef
int
(
*
enb_agent_message_destruction_callback
)(
Protocol__ProgranMessage
*
msg
);
typedef
int32_t
err_code_t
;
int
enb_agent_serialize_message
(
Protocol__ProgranMessage
*
msg
,
void
**
buf
,
int
*
size
);
...
...
This diff is collapsed.
Click to expand it.
openair2/ENB_APP/enb_agent_handler.c
View file @
b9cf840a
...
...
@@ -50,6 +50,15 @@ enb_agent_message_decoded_callback messages_callback[][3] = {
};
enb_agent_message_destruction_callback
message_destruction_callback
[]
=
{
enb_agent_destroy_hello
,
enb_agent_destroy_echo_request
,
enb_agent_destroy_echo_reply
,
0
,
/*No stats request message is created in the agent. No need for a callback*/
enb_agent_mac_destroy_stats_reply
,
};
static
const
char
*
enb_agent_direction2String
[]
=
{
""
,
/* not_set */
"originating message"
,
/* originating message */
...
...
@@ -114,7 +123,7 @@ void * enb_agent_send_message(uint32_t xid,
// free the msg --> later keep this in the data struct and just update the values
//TODO call proper destroy function
// enb_agent_mac_destroy_stats_reply(msg
);
err_code
=
((
*
message_destruction_callback
[
msg
->
msg_case
-
1
])(
msg
)
);
DevAssert
(
buffer
!=
NULL
);
...
...
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