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
wangjie
OpenXG-RAN
Commits
ec9e70a0
Commit
ec9e70a0
authored
Oct 26, 2018
by
Robert Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FlexRAN: provide better error messages in async channel
parent
d7948d04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
8 deletions
+25
-8
openair2/ENB_APP/flexran_agent.c
openair2/ENB_APP/flexran_agent.c
+8
-1
openair2/ENB_APP/flexran_agent_async.c
openair2/ENB_APP/flexran_agent_async.c
+17
-7
No files found.
openair2/ENB_APP/flexran_agent.c
View file @
ec9e70a0
...
...
@@ -201,6 +201,11 @@ int flexran_agent_start(mid_t mod_id)
/*Create the async channel info*/
flexran_agent_async_channel_t
*
channel_info
=
flexran_agent_async_channel_info
(
mod_id
,
in_ip
,
in_port
);
if
(
!
channel_info
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create channel_info
\n
"
);
exit
(
1
);
}
/*Create a channel using the async channel info*/
channel_id
=
flexran_agent_create_channel
((
void
*
)
channel_info
,
flexran_agent_async_msg_send
,
...
...
@@ -209,12 +214,14 @@ int flexran_agent_start(mid_t mod_id)
if
(
channel_id
<=
0
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create channel
\n
"
);
goto
error
;
}
flexran_agent_channel_t
*
channel
=
get_channel
(
channel_id
);
if
(
channel
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not get channel for channel_id %d
\n
"
,
channel_id
);
goto
error
;
}
...
...
@@ -307,7 +314,7 @@ int flexran_agent_start(mid_t mod_id)
return
0
;
error:
LOG_
I
(
FLEXRAN_AGENT
,
"there was an error
\n
"
);
LOG_
E
(
FLEXRAN_AGENT
,
"%s(): there was an error
\n
"
,
__func__
);
return
1
;
}
...
...
openair2/ENB_APP/flexran_agent_async.c
View file @
ec9e70a0
...
...
@@ -36,13 +36,18 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
flexran_agent_async_channel_t
*
channel
;
channel
=
(
flexran_agent_async_channel_t
*
)
malloc
(
sizeof
(
flexran_agent_channel_t
));
if
(
channel
==
NULL
)
goto
error
;
if
(
channel
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not allocate memory for flexran_agent_async_channel_t
\n
"
);
return
NULL
;
}
channel
->
enb_id
=
mod_id
;
/*Create a socket*/
channel
->
link
=
new_link_client
(
dst_ip
,
dst_port
);
if
(
channel
->
link
==
NULL
)
goto
error
;
if
(
channel
->
link
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create new link client
\n
"
);
goto
error
;
}
LOG_I
(
FLEXRAN_AGENT
,
"starting enb agent client for module id %d on ipv4 %s, port %d
\n
"
,
channel
->
enb_id
,
...
...
@@ -56,12 +61,17 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
// channel->send_queue = new_message_queue(500);
// not using the circular buffer: affects the PDCP split
channel
->
send_queue
=
new_message_queue
();
if
(
channel
->
send_queue
==
NULL
)
goto
error
;
if
(
channel
->
send_queue
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create send_queue
\n
"
);
goto
error
;
}
// not using the circular buffer: affects the PDCP split
//channel->receive_queue = new_message_queue(500);
channel
->
send_queue
=
new_message_queue
();
if
(
channel
->
receive_queue
==
NULL
)
goto
error
;
if
(
channel
->
receive_queue
==
NULL
)
{
LOG_E
(
FLEXRAN_AGENT
,
"could not create send_queue
\n
"
);
goto
error
;
}
/*
* create a link manager
...
...
@@ -81,7 +91,7 @@ flexran_agent_async_channel_t * flexran_agent_async_channel_info(mid_t mod_id, c
return
channel
;
error:
LOG_I
(
FLEXRAN_AGENT
,
"there was an error
\n
"
);
LOG_I
(
FLEXRAN_AGENT
,
"%s(): there was an error
\n
"
,
__func__
);
return
NULL
;
}
...
...
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