Stop RX stream when cell not found during initial cell search

This commit is contained in:
Ismael Gomez 2018-02-22 12:13:53 +01:00
parent f49d399a1e
commit 5251cb3671
1 changed files with 2 additions and 0 deletions

View File

@ -186,9 +186,11 @@ int rf_cell_search(srslte_rf_t *rf, uint32_t nof_rx_antennas,
ret = srslte_ue_cellsearch_scan(&cs, found_cells, &max_peak_cell);
}
if (ret < 0) {
srslte_rf_stop_rx_stream(rf);
fprintf(stderr, "Error searching cell\n");
return SRSLTE_ERROR;
} else if (ret == 0) {
srslte_rf_stop_rx_stream(rf);
fprintf(stderr, "Could not find any cell in this frequency\n");
return SRSLTE_SUCCESS;
}