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
bad4b794
Commit
bad4b794
authored
Apr 15, 2016
by
Xenofon Foukas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed bug when delegating control when delegated lib was previously NULL
parent
673ef5fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
openair2/ENB_APP/enb_agent_mac_internal.c
openair2/ENB_APP/enb_agent_mac_internal.c
+13
-11
No files found.
openair2/ENB_APP/enb_agent_mac_internal.c
View file @
bad4b794
...
@@ -579,25 +579,25 @@ int parse_mac_config(mid_t mod_id, yaml_parser_t *parser) {
...
@@ -579,25 +579,25 @@ int parse_mac_config(mid_t mod_id, yaml_parser_t *parser) {
switch
(
event
.
type
)
{
switch
(
event
.
type
)
{
case
YAML_SEQUENCE_START_EVENT
:
case
YAML_SEQUENCE_START_EVENT
:
LOG_
I
(
ENB_APP
,
"A sequence just started as expected
\n
"
);
LOG_
D
(
ENB_APP
,
"A sequence just started as expected
\n
"
);
sequence_started
=
1
;
sequence_started
=
1
;
break
;
break
;
case
YAML_SEQUENCE_END_EVENT
:
case
YAML_SEQUENCE_END_EVENT
:
LOG_
I
(
ENB_APP
,
"A sequence ended
\n
"
);
LOG_
D
(
ENB_APP
,
"A sequence ended
\n
"
);
sequence_started
=
0
;
sequence_started
=
0
;
break
;
break
;
case
YAML_MAPPING_START_EVENT
:
case
YAML_MAPPING_START_EVENT
:
if
(
!
sequence_started
)
{
if
(
!
sequence_started
)
{
goto
error
;
goto
error
;
}
}
LOG_
I
(
ENB_APP
,
"A mapping started
\n
"
);
LOG_
D
(
ENB_APP
,
"A mapping started
\n
"
);
mapping_started
=
1
;
mapping_started
=
1
;
break
;
break
;
case
YAML_MAPPING_END_EVENT
:
case
YAML_MAPPING_END_EVENT
:
if
(
!
mapping_started
)
{
if
(
!
mapping_started
)
{
goto
error
;
goto
error
;
}
}
LOG_
I
(
ENB_APP
,
"A mapping ended
\n
"
);
LOG_
D
(
ENB_APP
,
"A mapping ended
\n
"
);
mapping_started
=
0
;
mapping_started
=
0
;
break
;
break
;
case
YAML_SCALAR_EVENT
:
case
YAML_SCALAR_EVENT
:
...
@@ -606,15 +606,15 @@ int parse_mac_config(mid_t mod_id, yaml_parser_t *parser) {
...
@@ -606,15 +606,15 @@ int parse_mac_config(mid_t mod_id, yaml_parser_t *parser) {
}
}
// Check the types of subsystems offered and handle their values accordingly
// Check the types of subsystems offered and handle their values accordingly
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"dl_scheduler"
)
==
0
)
{
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"dl_scheduler"
)
==
0
)
{
LOG_
I
(
ENB_APP
,
"This is for the dl_scheduler subsystem
\n
"
);
LOG_
D
(
ENB_APP
,
"This is for the dl_scheduler subsystem
\n
"
);
// Call the proper handler
// Call the proper handler
if
(
parse_dl_scheduler_config
(
mod_id
,
parser
)
==
-
1
)
{
if
(
parse_dl_scheduler_config
(
mod_id
,
parser
)
==
-
1
)
{
LOG_
I
(
ENB_APP
,
"An error occured
\n
"
);
LOG_
D
(
ENB_APP
,
"An error occured
\n
"
);
goto
error
;
goto
error
;
}
}
}
else
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"ul_scheduler"
)
==
0
)
{
}
else
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"ul_scheduler"
)
==
0
)
{
// Call the proper handler
// Call the proper handler
LOG_
I
(
ENB_APP
,
"This is for the ul_scheduler subsystem
\n
"
);
LOG_
D
(
ENB_APP
,
"This is for the ul_scheduler subsystem
\n
"
);
goto
error
;
goto
error
;
// TODO
// TODO
}
else
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"ra_scheduler"
)
==
0
)
{
}
else
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"ra_scheduler"
)
==
0
)
{
...
@@ -674,7 +674,7 @@ int parse_dl_scheduler_config(mid_t mod_id, yaml_parser_t *parser) {
...
@@ -674,7 +674,7 @@ int parse_dl_scheduler_config(mid_t mod_id, yaml_parser_t *parser) {
}
}
// Check what key needs to be set
// Check what key needs to be set
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"behavior"
)
==
0
)
{
if
(
strcmp
(
event
.
data
.
scalar
.
value
,
"behavior"
)
==
0
)
{
LOG_
D
(
ENB_APP
,
"Time to set the behavior attribute
\n
"
);
LOG_
I
(
ENB_APP
,
"Time to set the behavior attribute
\n
"
);
yaml_event_delete
(
&
event
);
yaml_event_delete
(
&
event
);
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
{
if
(
!
yaml_parser_parse
(
parser
,
&
event
))
{
goto
error
;
goto
error
;
...
@@ -682,7 +682,7 @@ int parse_dl_scheduler_config(mid_t mod_id, yaml_parser_t *parser) {
...
@@ -682,7 +682,7 @@ int parse_dl_scheduler_config(mid_t mod_id, yaml_parser_t *parser) {
if
(
event
.
type
==
YAML_SCALAR_EVENT
)
{
if
(
event
.
type
==
YAML_SCALAR_EVENT
)
{
if
(
load_dl_scheduler_function
(
mod_id
,
event
.
data
.
scalar
.
value
)
==
-
1
)
{
if
(
load_dl_scheduler_function
(
mod_id
,
event
.
data
.
scalar
.
value
)
==
-
1
)
{
goto
error
;
goto
error
;
}
}
}
else
{
}
else
{
goto
error
;
goto
error
;
}
}
...
@@ -768,7 +768,7 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
...
@@ -768,7 +768,7 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
char
lib_name
[
120
];
char
lib_name
[
120
];
char
target
[
512
];
char
target
[
512
];
sprintf
(
lib_name
,
sizeof
(
lib_name
),
"/%s.so"
,
function_name
);
s
n
printf
(
lib_name
,
sizeof
(
lib_name
),
"/%s.so"
,
function_name
);
strcpy
(
target
,
local_cache
);
strcpy
(
target
,
local_cache
);
strcat
(
target
,
lib_name
);
strcat
(
target
,
lib_name
);
...
@@ -781,7 +781,9 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
...
@@ -781,7 +781,9 @@ int load_dl_scheduler_function(mid_t mod_id, const char *function_name) {
if
(
loaded_scheduler
)
{
if
(
loaded_scheduler
)
{
if
(
mac_agent_registered
[
mod_id
])
{
if
(
mac_agent_registered
[
mod_id
])
{
agent_mac_xface
[
mod_id
]
->
enb_agent_schedule_ue_spec
=
loaded_scheduler
;
agent_mac_xface
[
mod_id
]
->
enb_agent_schedule_ue_spec
=
loaded_scheduler
;
dlclose
(
agent_mac_xface
[
mod_id
]
->
dl_scheduler_loaded_lib
);
if
(
agent_mac_xface
[
mod_id
]
->
dl_scheduler_loaded_lib
!=
NULL
)
{
dlclose
(
agent_mac_xface
[
mod_id
]
->
dl_scheduler_loaded_lib
);
}
agent_mac_xface
[
mod_id
]
->
dl_scheduler_loaded_lib
=
lib
;
agent_mac_xface
[
mod_id
]
->
dl_scheduler_loaded_lib
=
lib
;
LOG_D
(
ENB_APP
,
"Delegated control for DL UE scheduler succesfully
\n
"
);
LOG_D
(
ENB_APP
,
"Delegated control for DL UE scheduler succesfully
\n
"
);
}
}
...
...
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