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
ZhouShuya
OpenXG-RAN
Commits
cba9d69b
Commit
cba9d69b
authored
Jul 31, 2018
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix segfault when running with stdout stream caching disabled
parent
6c23bdec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
17 deletions
+11
-17
common/utils/LOG/log.c
common/utils/LOG/log.c
+5
-0
common/utils/LOG/log.h
common/utils/LOG/log.h
+1
-7
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
+5
-10
No files found.
common/utils/LOG/log.c
View file @
cba9d69b
...
...
@@ -73,6 +73,7 @@ mapping log_options[] = {
mapping
log_maskmap
[]
=
{
{
"prach"
,
DEBUG_PRACH
},
{
"RU"
,
DEBUG_RU
},
{
"LTEESTIM"
,
DEBUG_LTEESTIM
},
{
"ctrlsocket"
,
DEBUG_CTRLSOCKET
},
{
"UE_PHYPROC"
,
DEBUG_UE_PHYPROC
},
{
"UE_TIMING"
,
UE_TIMING
},
...
...
@@ -315,10 +316,14 @@ void log_getconfig(log_t *g_log) {
logparams_debug
[
i
].
defuintval
=
0
;
logparams_debug
[
i
].
type
=
TYPE_UINT
;
logparams_debug
[
i
].
paramflags
=
PARAMFLAG_BOOL
;
logparams_debug
[
i
].
uptr
=
NULL
;
logparams_debug
[
i
].
chkPptr
=
NULL
;
logparams_debug
[
i
].
numelt
=
0
;
logparams_matlab
[
i
].
defuintval
=
0
;
logparams_matlab
[
i
].
type
=
TYPE_UINT
;
logparams_matlab
[
i
].
paramflags
=
PARAMFLAG_BOOL
;
logparams_matlab
[
i
].
uptr
=
NULL
;
logparams_matlab
[
i
].
chkPptr
=
NULL
;
logparams_matlab
[
i
].
numelt
=
0
;
}
config_get
(
logparams_debug
,(
sizeof
(
log_maskmap
)
/
sizeof
(
mapping
))
-
1
,
CONFIG_STRING_LOG_PREFIX
);
...
...
common/utils/LOG/log.h
View file @
cba9d69b
...
...
@@ -134,6 +134,7 @@ extern "C" {
#define DEBUG_PRACH (1<<0)
#define DEBUG_RU (1<<1)
#define DEBUG_UE_PHYPROC (1<<2)
#define DEBUG_LTEESTIM (1<<3)
#define DEBUG_CTRLSOCKET (1<<10)
#define UE_TIMING (1<<20)
...
...
@@ -143,13 +144,6 @@ extern "C" {
#define SET_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask | O)
#define CLEAR_LOG_MATLAB(O) g_log->matlab_mask = (g_log->matlab_mask & (~O))
/* @}*/
#define OAI_OK 0
/*!< \brief all ok */
#define OAI_ERR 1
/*!< \brief generic error */
#define OAI_ERR_READ_ONLY 2
/*!< \brief tried to write to read-only item */
#define OAI_ERR_NOTFOUND 3
/*!< \brief something wasn't found */
/* @}*/
typedef
enum
{
...
...
openair1/PHY/LTE_ESTIMATION/lte_sync_time.c
View file @
cba9d69b
...
...
@@ -274,11 +274,11 @@ int lte_sync_time_init(LTE_DL_FRAME_PARMS *frame_parms ) // LTE_UE_COMMON *com
#ifdef DEBUG_PHY
LOG_M_BEGIN
(
DEBUG_LTEESTIM
);
LOG_M
(
"primary_sync0.m"
,
"psync0"
,
primary_synch0_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync1.m"
,
"psync1"
,
primary_synch1_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
LOG_M
(
"primary_sync2.m"
,
"psync2"
,
primary_synch2_time
,
frame_parms
->
ofdm_symbol_size
,
1
,
1
);
#endif
LOG_M_END
return
(
1
);
}
...
...
@@ -330,10 +330,6 @@ static inline int abs32(int x)
return
(((
int
)((
short
*
)
&
x
)[
0
])
*
((
int
)((
short
*
)
&
x
)[
0
])
+
((
int
)((
short
*
)
&
x
)[
1
])
*
((
int
)((
short
*
)
&
x
)[
1
]));
}
#ifdef DEBUG_PHY
int
debug_cnt
=
0
;
#endif
#define SHIFT 17
int
lte_sync_time
(
int
**
rxdata
,
///rx data in time domain
...
...
@@ -464,7 +460,8 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
LOG_I
(
PHY
,
"[UE] lte_sync_time: Sync source = %d, Peak found at pos %d, val = %d (%d dB)
\n
"
,
sync_source
,
peak_pos
,
peak_val
,
dB_fixed
(
peak_val
)
/
2
);
#ifdef DEBUG_PHY
LOG_M_BEGIN
(
DEBUG_LTEESTIM
)
static
int
debug_cnt
;
if
(
debug_cnt
==
0
)
{
LOG_M
(
"sync_corr0_ue.m"
,
"synccorr0"
,
sync_corr_ue0
,
2
*
length
,
1
,
2
);
LOG_M
(
"sync_corr1_ue.m"
,
"synccorr1"
,
sync_corr_ue1
,
2
*
length
,
1
,
2
);
...
...
@@ -474,9 +471,7 @@ int lte_sync_time(int **rxdata, ///rx data in time domain
}
else
{
debug_cnt
++
;
}
#endif
LOG_M_END
return
(
peak_pos
);
...
...
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