Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OAI-RAN-5G-sheduler_MaxTBS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MAQ5G-PFC
OAI-RAN-5G-sheduler_MaxTBS
Commits
606e51f8
Commit
606e51f8
authored
9 years ago
by
Florian Kaltenberger
Browse files
Options
Downloads
Patches
Plain Diff
improved error handling in common lib
parent
16b0ec39
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
targets/ARCH/COMMON/common_lib.c
+11
-6
11 additions, 6 deletions
targets/ARCH/COMMON/common_lib.c
with
11 additions
and
6 deletions
targets/ARCH/COMMON/common_lib.c
+
11
−
6
View file @
606e51f8
...
...
@@ -103,14 +103,18 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
if
(
flag
==
BBU_LOCAL_RADIO_HEAD
)
{
lib_handle
=
dlopen
(
OAI_RF_LIBNAME
,
RTLD_LAZY
);
if
(
!
lib_handle
)
{
printf
(
"Unable to locate %s: HW device set to NONE_DEV.
\n
"
,
OAI_RF_LIBNAME
);
return
0
;
fprintf
(
stderr
,
"Unable to locate %s: HW device set to NONE_DEV.
\n
"
,
OAI_RF_LIBNAME
);
fprintf
(
stderr
,
"%s
\n
"
,
dlerror
());
return
-
1
;
}
dp
=
dlsym
(
lib_handle
,
"device_init"
);
if
(
dp
!=
NULL
)
{
dp
(
device
,
openair0_cfg
);
if
(
dp
(
device
,
openair0_cfg
)
!=
0
)
{
fprintf
(
stderr
,
"Error initializing device
\n
"
);
return
-
1
;
}
}
else
{
fprintf
(
stderr
,
"%s %d:oai device intializing function not found %s
\n
"
,
__FILE__
,
__LINE__
,
dlerror
());
return
-
1
;
...
...
@@ -119,7 +123,8 @@ int load_lib(openair0_device *device, openair0_config_t *openair0_cfg, eth_param
lib_handle
=
dlopen
(
OAI_TP_LIBNAME
,
RTLD_LAZY
);
if
(
!
lib_handle
)
{
printf
(
"Unable to locate %s: transport protocol set to NONE_TP.
\n
"
,
OAI_TP_LIBNAME
);
return
0
;
printf
(
"%s
\n
"
,
dlerror
());
return
-
1
;
}
tp
=
dlsym
(
lib_handle
,
"transport_init"
);
...
...
@@ -152,7 +157,7 @@ int openair0_device_load(openair0_device *device, openair0_config_t *openair0_cf
}
}
#endif
return
0
;
return
rc
;
}
int
openair0_transport_load
(
openair0_device
*
device
,
openair0_config_t
*
openair0_cfg
,
eth_params_t
*
eth_params
)
{
...
...
@@ -164,7 +169,7 @@ int openair0_transport_load(openair0_device *device, openair0_config_t *openair0
return
-
1
;
}
}
return
0
;
return
rc
;
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment