diff --git a/lib/src/common/log_filter.cc b/lib/src/common/log_filter.cc index 6720c21ad..b498d466c 100644 --- a/lib/src/common/log_filter.cc +++ b/lib/src/common/log_filter.cc @@ -126,7 +126,7 @@ void log_filter::all_log(srslte::LOG_LEVEL_ENUM level, ss << std::endl; } - if (hex_limit > 0) { + if (hex_limit > 0 && hex && size > 0) { ss << hex_string(hex, size); } str_ptr s_ptr(new std::string(ss.str())); diff --git a/srsue/src/phy/phch_worker.cc b/srsue/src/phy/phch_worker.cc index 81a4554a2..059ba5830 100644 --- a/srsue/src/phy/phch_worker.cc +++ b/srsue/src/phy/phch_worker.cc @@ -367,7 +367,7 @@ void phch_worker::work_imp() update_measurements(); if (chest_ok) { - if (phy->avg_rsrp_dbm > -124.0) { + if (phy->avg_rsrp_dbm > -124.0 && 10*log10(srslte_chest_dl_get_snr(&ue_dl.chest)) > -30.0) { log_h->debug("SNR=%.1f dB, RSRP=%.1f dBm sync=in-sync from channel estimator\n", 10*log10(srslte_chest_dl_get_snr(&ue_dl.chest)), phy->avg_rsrp_dbm); chest_loop->in_sync();