Commit cba9d69b authored by frtabu's avatar frtabu

fix segfault when running with stdout stream caching disabled

parent 6c23bdec
Pipeline #10221 passed with stage
in 0 seconds
......@@ -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);
......
......@@ -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 {
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment