Commit 7a1d0bb8 authored by luaihui's avatar luaihui

delete exit()

parent bdc2a63e
......@@ -202,7 +202,6 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
if ( strstr(argv[i], "help_config") != NULL ) {
config_printhelp(Config_Params,CONFIG_PARAMLENGTH(Config_Params),CONFIG_SECTIONNAME);
//exit(0);
exit_fun("exit0");
}
......@@ -237,7 +236,6 @@ configmodule_interface_t *load_configmodule(int argc, char **argv, uint32_t init
if (i< 0) {
fprintf(stderr,"[CONFIG] %s, %d, sscanf error parsing config source %s: %s\n", __FILE__, __LINE__,cfgparam, strerror(errno));
//exit(-1) ;
exit_fun("sscanf error");
} else if ( i == 1 ) {
/* -O argument doesn't contain ":" separator, assume -O <conf file> option, default cfgmode to libconfig
......
......@@ -246,7 +246,6 @@ void log_getconfig(log_t *g_log) {
break;
} else if (log_options[j+1].name == NULL) {
fprintf(stderr,"Unknown log option: %s\n",logparams_defaults[LOG_OPTIONS_IDX].strlistptr[i]);
//exit(-1);
exit_fun("log_getconfig Unknown log option");
}
}
......
......@@ -3151,7 +3151,6 @@ void dft128(int16_t *x,int16_t *y,int scale)
}
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft128out.m","dft128",y,128,1,1);
//exit(-1);
exit_fun("DEBUG DFT128out.m");
}
_mm_empty();
......@@ -3223,7 +3222,6 @@ void dft128(int16_t *x,int16_t *y,int scale)
}
if (LOG_DUMPFLAG(DEBUG_DFT)) {
LOG_M("dft128.m","dft",y256,128,1,1);
//exit(-1);
exit_fun("DEBUG DFT128.m");
}
}
......
......@@ -2715,7 +2715,6 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
if (t_reloc_prep <= 0 || t_reloc_prep > 10000 ||
tx2_reloc_overall <= 0 || tx2_reloc_overall > 20000) {
LOG_E(X2AP, "timers in configuration file have wrong values. We must have [0 < t_reloc_prep <= 10000] and [0 < tx2_reloc_overall <= 20000]\n");
//exit(1);
exit_fun("X2AP config error. t_reloc_prep or tx2_reloc_overall error");
}
......@@ -2740,7 +2739,6 @@ int RCconfig_X2(MessageDef *msg_p, uint32_t i) {
if ((NETParams[ENB_IPV4_ADDR_FOR_X2C_IDX].strptr == NULL) || (X2AP_REGISTER_ENB_REQ (msg_p).enb_port_for_X2C == 0)) {
LOG_E(RRC,"Add eNB IPv4 address and/or port for X2C in the CONF file!\n");
//exit(1);
exit_fun("X2AP config error. target ip format invalid");
}
......
......@@ -351,7 +351,6 @@ static int maxsize = SMAX;
static void put(char x) {
if (size == maxsize) {
printf("incrase SMAX\n");
//exit(1);
exit_fun("incrase SMAX");
}
......
......@@ -104,12 +104,10 @@ int message_put(message_queue_t *queue, void *data, int size, int priority)
if (pthread_cond_signal(queue->cond)) {
LOG_E(MAC, "%s:%d:%s: fatal error\n", __FILE__, __LINE__, __FUNCTION__);
pthread_mutex_unlock(queue->mutex);
//exit(1);
exit_function(__FILE__, __FUNCTION__, __LINE__, "message_put fatal: pthread_cond_signal error");
}
if (pthread_mutex_unlock(queue->mutex)) {
LOG_E(MAC, "%s:%d:%s: fatal error\n", __FILE__, __LINE__, __FUNCTION__);
//exit(1);
exit_function(__FILE__, __FUNCTION__, __LINE__, "message_put fatal: pthread_mutex_unlock error");
}
......
......@@ -269,7 +269,6 @@ sctp_handle_new_association_req_multi(
sctp_new_association_req_p->remote_address.ipv6_address);
//close(sd);
//return;
//exit(1);
exit_fun("sctp_handle_new_association_req_multi fatal: inet_pton error");
}
......@@ -290,7 +289,6 @@ sctp_handle_new_association_req_multi(
sctp_new_association_req_p->remote_address.ipv4_address);
//close(sd);
//return;
//exit(1);
exit_fun("sctp_handle_new_association_req_multi fatal: inet_pton error");
}
......@@ -330,7 +328,6 @@ sctp_handle_new_association_req_multi(
if (ns == -1) {
perror("sctp_peeloff");
printf("sctp_peeloff: sd=%d assoc_id=%d\n", sd, assoc_id);
//exit(1);
exit_fun("sctp_handle_new_association_req_multi fatal: sctp_peeloff error");
}
......
......@@ -236,7 +236,6 @@ void trx_brf_end(openair0_device *device) {
fprintf(stderr, "Failed to disable TX module: %s\n", bladerf_strerror(status));
}
bladerf_close(brf->dev);
//exit(1);
exit_fun("trx_brf_end exiting." );
}
......
......@@ -698,7 +698,6 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
free(ms_sample);
ms_sample = NULL;
iqfd = 0;
//exit(-1);
exit_fun("USRP read failure");
}
......@@ -805,7 +804,6 @@ int trx_usrp_set_gains(openair0_device *device,
if (openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] > gain_range.stop()) {
LOG_E(PHY,"RX Gain 0 too high, reduce by %f dB\n",
openair0_cfg[0].rx_gain[0]-openair0_cfg[0].rx_gain_offset[0] - gain_range.stop());
//exit(-1);
exit_fun("fatal: RX Gain 0 too high" );
}
......@@ -1383,7 +1381,6 @@ extern "C" {
if (s->use_gps == 1) {
if (sync_to_gps(device)) {
LOG_I(PHY,"USRP fails to sync with GPS...\n");
//exit(0);
exit_fun("fatal: USRP fails to sync with GPS..." );
}
}
......@@ -1399,7 +1396,6 @@ extern "C" {
if (ms_sample == NULL) {
std::cerr<< "Memory allocation failed for subframe record or replay mode." << std::endl;
//exit(-1);
exit_fun("fatal: Memory allocation failed for subframe record or replay mode." );
}
......@@ -1424,18 +1420,15 @@ extern "C" {
if (aligned == 0) {
std::cerr<< "mmap address is not 32 bytes aligned, exiting." << std::endl;
close(mmapfd);
//exit(-1);
exit_fun("fatal: mmap address is not 32 bytes aligned, exiting." );
}
} else {
std::cerr << "Cannot mmap file, exiting." << std::endl;
close(mmapfd);
//exit(-1);
exit_fun("fatal: Cannot mmap file, exiting." );
}
} else {
std::cerr << "Cannot open " << u_sf_filename << " , exiting." << std::endl;
//exit(-1);
exit_fun("fatal: open error , exiting." );
}
} else {
......@@ -1452,7 +1445,6 @@ extern "C" {
if (ms_sample == NULL) {
std::cerr<< "Memory allocation failed for individual subframe replay mode." << std::endl;
close(iqfd);
//exit(-1);
exit_fun("fatal: Memory allocation failed for individual subframe replay mode." );
}
......@@ -1466,7 +1458,6 @@ extern "C" {
}
} else {
std::cerr << "Cannot open " << u_sf_filename << " , exiting." << std::endl;
//exit(-1);
exit_fun("fatal: open error , exiting." );
}
}
......
......@@ -1200,7 +1200,6 @@ if (NFAPI_MODE!=NFAPI_MODE_VNF) {
if (!eNB->dlsch[i][j]) {
LOG_E(PHY,"Can't get eNB dlsch structures for UE %d \n", i);
//exit(-1);
exit_fun("Can't get eNB dlsch structures" );
} else {
eNB->dlsch[i][j]->rnti=0;
......@@ -1213,7 +1212,6 @@ if (NFAPI_MODE!=NFAPI_MODE_VNF) {
if (!eNB->ulsch[1+i]) {
LOG_E(PHY,"Can't get eNB ulsch structures\n");
//exit(-1);
exit_fun("Can't get eNB ulsch structures" );
}
......@@ -1227,7 +1225,6 @@ if (NFAPI_MODE!=NFAPI_MODE_VNF) {
if (!eNB->ulsch[0]) {
LOG_E(PHY,"Can't get eNB ulsch structures\n");
//exit(-1);
exit_fun("Can't get eNB ulsch structures" );
}
......
......@@ -1661,7 +1661,6 @@ void *ru_thread( void *param ) {
if (setup_RU_buffers(ru)!=0) {
printf("Exiting, cannot initialize RU Buffers\n");
//exit(-1);
exit_fun("Exiting, cannot initialize RU Buffers" );
}
......@@ -1686,7 +1685,6 @@ void *ru_thread( void *param ) {
if (setup_RU_buffers(ru)!=0) {
printf("Exiting, cannot initialize RU Buffers\n");
//exit(-1);
exit_fun("Exiting, cannot initialize RU Buffers" );
}
AssertFatal((ret=pthread_mutex_lock(&RC.ru_mutex))==0,"mutex_lock returns %d\n",ret);
......@@ -1957,7 +1955,6 @@ void *ru_thread_synch(void *arg) {
LOG_M("ru_sync_corr.m","sync_corr",ru->dmrs_corr,LTE_NUMBER_OF_SUBFRAMES_PER_FRAME*fp->samples_per_tti,1,6);
LOG_M("ru_dmrs.m","rudmrs",&ru->dmrssync[0],fp->ofdm_symbol_size,1,1);
//exit(-1);
exit_fun("Exiting, Cannot find synch reference" );
}
}
......@@ -2321,7 +2318,6 @@ void init_RU_proc(RU_t *ru) {
if (setup_RU_buffers(ru)!=0) {
printf("Exiting, cannot initialize RU Buffers\n");
//exit(-1);
exit_fun("Exiting, cannot initialize RU Buffers" );
}
}
......@@ -2532,7 +2528,6 @@ void set_function_spec_param(RU_t *ru) {
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
//exit(-1);
exit_fun("Exiting, cannot initialize transport protocol" );
}
} else if (ru->function == NGFI_RRU_IF4p5) {
......@@ -2557,7 +2552,6 @@ void set_function_spec_param(RU_t *ru) {
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
//exit(-1);
exit_fun("Exiting, cannot initialize transport protocol" );
}
......@@ -2617,7 +2611,6 @@ void set_function_spec_param(RU_t *ru) {
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
//exit(-1);
exit_fun("Exiting, cannot initialize transport protocol" );
}
......@@ -2644,7 +2637,6 @@ void set_function_spec_param(RU_t *ru) {
if (ret<0) {
printf("Exiting, cannot initialize transport protocol\n");
//exit(-1);
exit_fun("Exiting, cannot initialize transport protocol" );
}
malloc_IF4p5_buffer(ru);
......
......@@ -543,7 +543,6 @@ int main( int argc, char **argv ) {
if (CONFIG_ISFLAGSET(CONFIG_ABORT) ) {
fprintf(stderr,"Getting configuration failed\n");
//exit(-1);
exit_fun("Getting configuration failed" );
}
......@@ -599,7 +598,6 @@ int main( int argc, char **argv ) {
if (create_tasks(1) < 0) {
printf("cannot create ITTI tasks\n");
//exit(-1);
exit_fun("cannot create ITTI tasks" );
}
......
......@@ -285,7 +285,6 @@ void thread_top_init(char *thread_name,
if (sched_setattr(0, &attr, flags) < 0 ) {
perror("[SCHED] eNB tx thread: sched_setattr failed\n");
fprintf(stderr,"sched_setattr Error = %s",strerror(errno));
//exit(1);
exit_fun("eNB tx thread: sched_setattr failed" );
}
......
......@@ -598,7 +598,6 @@ void* ru_thread_control( void* param ) {
if (setup_RU_buffers(ru)!=0) {
printf("Exiting, cannot initialize RU Buffers\n");
//exit(-1);
exit_fun("Exiting, cannot initialize RU Buffers" );
}
......@@ -622,7 +621,6 @@ void* ru_thread_control( void* param ) {
if (setup_RU_buffers(ru)!=0) {
printf("Exiting, cannot initialize RU Buffers\n");
//exit(-1);
exit_fun("Exiting, cannot initialize RU Buffers" );
}
......
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